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 597804 - Dramatically speed up thumbnailing
Dramatically speed up thumbnailing
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: afc backend and volume monitor
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2009-10-08 13:31 UTC by David Zeuthen (not reading bugmail)
Modified: 2009-11-09 16:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[afc] Add thumbnails for Photos in /DCIM (4.87 KB, patch)
2009-11-06 00:40 UTC, Bastien Nocera
none Details | Review
Add thumbnails for Photos in /DCIM (5.38 KB, patch)
2009-11-09 10:41 UTC, Bastien Nocera
none Details | Review

Description David Zeuthen (not reading bugmail) 2009-10-08 13:31:43 UTC
Looks like the thumbs are exported:

$ gvfs-ls afc://a1f47b63bae8bae2bb5aa3d59b8b4c38627e738e/DCIM/100APPLE/.MISC |head -5
IMG_0006.BTH
IMG_0006.THM
IMG_0007.BTH
IMG_0007.THM
IMG_0008.BTH

And

$ eog afc://a1f47b63bae8bae2bb5aa3d59b8b4c38627e738e/DCIM/100APPLE/.MISC/IMG_0006.THM

actually displays a nice thumb (75x75 pixels). So the afc:// backend should play the same games as we do in gphoto2 with preview::icon:

http://library.gnome.org/devel/gio/unstable/GFileInfo.html#G-FILE-ATTRIBUTE-PREVIEW-ICON--CAPS
Comment 1 Bastien Nocera 2009-11-06 00:40:38 UTC
Created attachment 147066 [details] [review]
[afc] Add thumbnails for Photos in /DCIM

Photos taken using the iPhone or iPod touch will be thumbnailed
by the device, on-disk, so try to use those instead of letting
the computer download the whole file for it.
Comment 2 Bastien Nocera 2009-11-06 00:41:37 UTC
Can't test it (no camera or recent OS on my iPod Touch), but this should work.
Comment 3 Bastien Nocera 2009-11-09 10:41:50 UTC
Created attachment 147262 [details] [review]
Add thumbnails for Photos in /DCIM

Photos taken using the iPhone or iPod touch will be thumbnailed
by the device, on-disk, so try to use those instead of letting
the computer download the whole file for it.

Make sure we only process non-hidden files inside the DCIM
directory, to avoid unnecessary checks.
Comment 4 David Zeuthen (not reading bugmail) 2009-11-09 15:54:56 UTC
Tested this on my iPhone with 100ish photos - works well, it's only a litle bit faster though.

There's a side-effect insofar that all thumbnails are square. 

To explain, when a file is selected in Nautilus, it seems Nautilus is loading the entire file because the icon suddenly is no longer square. That's probably a (valid or not, probably valid) assumption made in Nautilus that the thumbnail is really just supposed to be a smaller version of the payload (e.g. same aspect ratio).
Comment 5 Bastien Nocera 2009-11-09 16:10:52 UTC
Comment on attachment 147262 [details] [review]
Add thumbnails for Photos in /DCIM

Committed minus the g_message() calls.
Comment 6 Bastien Nocera 2009-11-09 16:11:46 UTC
Fixed.

David, could you please create a bug against nautilus about it loading the thumbnail from the actual file instead of using the preview icon when the file is selected?
Comment 7 David Zeuthen (not reading bugmail) 2009-11-09 16:19:43 UTC
(In reply to comment #6)
> Fixed.

Cool, thanks.

> David, could you please create a bug against nautilus about it loading the
> thumbnail from the actual file instead of using the preview icon when the file
> is selected?

Sure, filed as bug 601272.