octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: m file cache


From: John W. Eaton
Subject: RE: m file cache
Date: Fri, 26 May 2006 16:14:49 -0400

On 26-May-2006, Billings, Paul wrote:

| Updating the cache in the dead time after prompt is printed (while user is
| typing, etc.) avoids any delay after the user hits <enter>.
| 
| If this delay is negligible (as you indicated it probably is), there is no
| compelling reason for the above approach.

It might be possible to do it this way by arranging for readline to
call a function (via rl_event_hook) while it is waiting for input.
But I'm not sure that it matters too much that it happen during the
idle time since updating the cache seems to be fast.  On my system it
takes about 2ms to update the cache when there is nothing to do
(except check the timestamps on the directories) and around 15ms when
all the directories have been touched.  So I don't think that overhead
is too bad.  It may become noticeable if all your files are across a
slow network link, but I think it will still be a win overall because
it should be much faster to find a file in the cache.

| It sure would be nice if a program could register with the OS as an observer
| (of specific files/dirs) and get notified on file system changes.  Seems
| like this comes up enough that it would have been included by now.  But that
| would probably make too much sense. ;-)

Yes, notification would be great.  There are ways to do this at least
on some systems, but the details vary.  If someone could put a nice
cross platform interface around the system-dependent methods, then
maybe we could do better.  But I don't really have time for that right
now.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]