Re: [Nautilus-list] directory content cache idea

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? 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. Try changing the FILES_TO_PROCESS_AT_ONCE constant in fm-directory-view.c if you want to experiment with this.

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.

Also, remember that the user can configure what's displayed underneath a file's icon. So it's not always the size, so we might need to cache more than just the size to make this kind of feature work well.

if you do experiment with this and find that it works well, I look forward to seeing the patch!

    -- Darin

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