After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 375548 - nautilus_directory_is_local() should cache its result
nautilus_directory_is_local() should cache its result
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: File and Folder Operations
2.16.x
Other All
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-11-15 15:07 UTC by Federico Mena Quintero
Modified: 2006-11-15 15:50 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
nautilus-375548-directory-cache-is-local.diff (1.76 KB, patch)
2006-11-15 15:10 UTC, Federico Mena Quintero
none Details | Review

Description Federico Mena Quintero 2006-11-15 15:07:44 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.
Comment 1 Federico Mena Quintero 2006-11-15 15:10:26 UTC
Created attachment 76642 [details] [review]
nautilus-375548-directory-cache-is-local.diff
Comment 2 Federico Mena Quintero 2006-11-15 15:50:23 UTC
Oops, this is already fixed on CVS.