Re: caching of file information?

2000-05-21 Thread Daniel Pittman

On Sun, 21 May 2000, Kai Großjohann [EMAIL PROTECTED]
wrote:

 "Daniel Pittman" [EMAIL PROTECTED] writes:
 
 [[ complicated caching mechanism ]]
 
 Is the complicated mechanism really necessary, or can we make do with
 a fairly simple mechanism which caches information for a short time
 only?

That's an open question. Caching information over a single operation
would give a big improvement to the performance of the code.

The real question is if EFS[1] is right, and that remote file system
performance[2] is sufficient without long-term caching of the
information.

EFS does keep information a long time - forever, so far as I can see.
This makes the access to the remote filesystem high performance, but
their implementation can be a *real* pain sometimes, if the cache is out
of date.

The model I outlined would help with that cache validity problem, at the
cost of some local processing.


For me, personally, I so very rarely edit files over slow links that the
problem is moot; I can wait the two seconds when opening a new file.

I guess that the best plan is to implement the simple cache and, if that
isn't good enough, implement the more complex one.

Daniel

Footnotes: 
[1]  I havn't used Ange-FTP, but presume that it has the same core
 model...

[2]  with these tools...

-- 
What is a poet? A poet is an unhappy being whose heart is torn by secret
sufferings, but whose lips are so strangely formed that when the sighs and
cries escape them, they sound like beautiful music.
-- Søren Kierkegaard, _Either/Or_ (1843)




Re: caching of file information?

2000-05-20 Thread Stefan Monnier

 "Kai" == Kai Großjohann [EMAIL PROTECTED] writes:
 Is the complicated mechanism really necessary, or can we make do with
 a fairly simple mechanism which caches information for a short time only?

I think that the sample you showed earlier indicates that we can already
win big-time with a trivial "flush on post-command-hook (and after
any file modification)" policy and caching of file attributes.

It would also be interesting to figure out why file-attributes
and file-exists-p (and friends) get called such an amazing number
of times.  A trace of where those are called from would be great.

It seems clear that this redundant work is also done on local files,
so even tho the performance hit there is less significant, it would
be worth it to try and reduce it.


Stefan




caching of file information?

2000-05-18 Thread Kai Großjohann

Thanks to Lothar who points out that rcp.el transfers 10k to open an
empty file.  That's quite a bit of stuff.  I had never thought it
would be this much.

So, there seems to be a need for caching.  But what data should we be
caching, and for how long?

One idea which crossed my mind is to use caching for one command, ie
to put rcp-empty-cache into post-command-hook.  This should be pretty
safe from stale cache contents, but is it also useful?

kai
-- 
Beware of flying birch trees.