GNOME Bugzilla – Bug 375548
nautilus_directory_is_local() should cache its result
Last modified: 2006-11-15 15:50:23 UTC
While looking at why SMB shares can be so slow to access, I ran into a little hotspot in NautilusDirectory. nautilus_directory_is_local() gets called a *lot*, especially through nautilus_file_is_local() (once for every expose event for every file!). This leads to a ton of round-trips to gnome-vfs-daemon. When browsing a directory with 115 files, Nautilus spends a good 0.3 seconds doing these roundtrips (including all the context switches, new threads in gnome-vfs-daemon, etc.). The attached patch fixes this problem by caching the result of is_local() inside NautilusDirectory. Please see http://primates.ximian.com/~federico/news-2006-11.html#is-local-roundtrips for a more detailed description.
Created attachment 76642 [details] [review] nautilus-375548-directory-cache-is-local.diff
Oops, this is already fixed on CVS.