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 648110 - Allow to disable thumbnailing per directory
Allow to disable thumbnailing per directory
Status: RESOLVED DUPLICATE of bug 586739
Product: nautilus
Classification: Core
Component: Thumbnails
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-04-18 13:25 UTC by Maciej Małecki
Modified: 2012-08-14 21:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (1.79 KB, patch)
2011-04-18 13:25 UTC, Maciej Małecki
none Details | Review
Second patch, fixing portability issues introduced in the first one. (1.54 KB, patch)
2011-04-19 12:15 UTC, Maciej Małecki
none Details | Review
Complete patch (mashup of two previous patches) (1.84 KB, patch)
2011-04-19 16:37 UTC, Maciej Małecki
rejected Details | Review

Description Maciej Małecki 2011-04-18 13:25:21 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.
Comment 1 Maciej Małecki 2011-04-19 12:15:43 UTC
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)
Comment 2 Maciej Małecki 2011-04-19 16:37:48 UTC
Created attachment 186301 [details] [review]
Complete patch (mashup of two previous patches)
Comment 3 Cosimo Cecchi 2011-09-07 21:35:36 UTC
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.
Comment 4 Cosimo Cecchi 2011-09-07 21:37:16 UTC
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?
Comment 5 Brandon Tuomela 2011-12-09 18:20:10 UTC
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.
Comment 6 William Jon McCann 2012-08-14 21:53:16 UTC

*** This bug has been marked as a duplicate of bug 586739 ***