GNOME Bugzilla – Bug 648110
Allow to disable thumbnailing per directory
Last modified: 2012-08-14 21:53:16 UTC
Created attachment 186200 [details] [review] Patch Allow to disable thumbnailing in a scope of a directory if .nautilus-no-thumbnailing exists in this directory. This patch is useful when you have a directory full of files (graphics, videos, PDFs, etc.) and don't want them to be thumbnailed, because it would take too much CPU time/memory. During a call to nautilus_can_thumbnail it checks if file .nautilus-no-thumbnailing exists in a directory. If it does, returns FALSE.
Created attachment 186273 [details] [review] Second patch, fixing portability issues introduced in the first one. Fixes possible portability issues introduced by first patch, which used string handling routines to deal with paths (now it uses glib functions)
Created attachment 186301 [details] [review] Complete patch (mashup of two previous patches)
Review of attachment 186301 [details] [review]: ::: libnautilus-private/nautilus-thumbnails.c @@ +544,2 @@ uri = nautilus_file_get_uri (file); + You should use g_file_get_parent() on the result of nautilus_file_get_location() @@ +550,3 @@ + + nt_file = g_file_new_for_uri (nt_path); + res = g_file_query_exists (nt_file, NULL); This is actually an expensive call, as it does sync I/O. If we go with this approach, this information would need to be cached for the parent directory when querying the list of files.
The patch itself would need more work, but I am not sure I like the approach, or whether this is actually an useful thing. Why do you need this level of granularity? Do you have a slow machine?
This is a very useful thing, I have several directories that contain tens of thousands of product images that will lock up a powerful machine. Disabling thumbnailing for just these directories would be a great improvement.
*** This bug has been marked as a duplicate of bug 586739 ***