Re: [Nautilus-list] directory content cache idea

Darin Adler <darin bentspoon com> writes:

> On Monday, June 11, 2001, at 03:59  AM, christian glodt ist lu wrote:
> > Why not use the metafile? It already has an entry for every file/dir
> > in a directory. The housekeeping code for it is already in place.
> > Biggest changes would be to extend it with more data, and to use it
> > to "speculatively" layout the icons when a directory is entered.
> Believe it or not, we planned this exact feature, caching file names
> and enough data to display the file's icon and text undernear it in
> metafiles,
>   when we originally planned Nautilus. However, I'm not sure it will
> have the effect you expect, though.
> I think that you are expecting that it will cause the files to appear
> faster in directories you have already visited. It's true that it will
> allow us to show files before reading the directory.
> But are you sure that the current slowness is due to the speed reading
> the directory? 

I/O are slow... Especially disk I/O :)

> Creating the data structure to show the files could
> easily be the problem. I agree that showing all the files at once
> would get rid of the redrawing, but Yoann and I recently had to add
> code to prevent it from showing all files at once because of how slow
> it was. 

That's not exactly true :
It was faster when drawing all the file in one time, but the latency 
between the time you load the directory and the time it show up 
(time to draw all the icon at once) was very bad on big directory 
(/usr/bin is a good exemple).

So, what happen now, is that we draw by chunk (current setting is 100
files a time, and it's too slow for me, I believe 50 would be better),
so it *seem* faster (the latency is reduced), but the complete load 
is longer...

It seem to me that's the good behavior (The user don't want to wait ~6
second before seeing the directory loaded, he want instant asynchronous 
directory loading).

Maybe there is a redrawing issue ?
Or maybe the canvas could be optimised ?

> Try changing the FILES_TO_PROCESS_AT_ONCE constant in
> fm-directory-view.c if you want to experiment with this.

You can also play with DIRECTORY_LOAD_ITEMS_PER_CALLBACK constant
in libnautilus-private/nautilus-directory-async.c...

> Anyway, besides the fact that we'd need to do other speedups and fixes
> to reap the rewards of storing this data in a metafile, we have one
> other problem. Is it going to be acceptable UI to see files in a
> directory that don't exist until the entire directory is loaded? A
> file that was once there will show up, and it won't disappear until
> the load of the directory is finished.

Maybe we could stat it ?

Yoann Vandoorselaere | Lost: gray and white female cat.  Answers to electric
MandrakeSoft         | can opener.

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