Re: Making nautilus faster with large directories



On Sun, 2004-12-05 at 18:41 -0500, William Lovaton wrote:
> Now that nautilus has received lots of love, may be it's a good time to
> propose another improvement: Make it faster with directories that have a
> large number of files in it.  Specially the files that could use
> thumbnailing like images, video, etc.

Thumbnailing has its own performance concerns, but...

What about loading "simple" directories with lots of files?  I've been
working on speeding up GtkFileChooser, which had timings notoriously
slow and similar to Nautilus's.  Things I learned:

- Using a tree model with a GtkTreeModelSort on top, *and* populating
the tree model incrementally, is a bad idea.  Ideally, your tree model
should implement GtkTreeSortable on its own.

- If you really use a GtkTreeModelSort, try to load as much as you can
of a folder into your tree model, and *then* stick under the
GtkTreeModelSort.  That way sorting is only done once.

- Try to read as much of a folder as possible before any sorting is
done.  The file chooser used 100 items per notification from the
gnome-vfs-async functions; now it uses 10000 items, so most folders can
be read in one pass.

For GtkFileChooser, this reduced the time to load /dev from 12 seconds
to around 4.  Still not as good as MC's 0.3 seconds, but it's a big
improvement anyway.  I wrote about this here:

	http://primates.ximian.com/~federico/news-2004-10.html#26
	http://primates.ximian.com/~federico/news-2004-11.html#18

  Federico




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