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 450241 - Video thumbnail generation blocks UI far too much
Video thumbnail generation blocks UI far too much
Status: RESOLVED FIXED
Product: gthumb
Classification: Other
Component: general
2.10.x
Other Linux
: Normal normal
: ---
Assigned To: Paolo Bacchilega
Paolo Bacchilega
Depends on:
Blocks:
 
 
Reported: 2007-06-23 00:43 UTC by Jason Tackaberry
Modified: 2007-08-11 14:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to process UI events before thumbnailing (1.13 KB, patch)
2007-06-29 13:48 UTC, Michael Chudobiak
rejected Details | Review

Description Jason Tackaberry 2007-06-23 00:43:55 UTC
When browsing directories that contain videos, gthumb attempts to generate thumbnails for those video files, which is a nice idea in theory, but in practice it renders the UI completely unusable while it is generating the thumbnails.

The obvious fixes are to thread the thumbnail generation, or put it out-of-process, but I'd be willing to accept a gconf preference to disable this video thumbnail functionality as I find it intolerable.
Comment 1 Michael Chudobiak 2007-06-29 12:49:52 UTC
The UI is pretty unresponsive during any thumbnail generation (not just for videos).

Image loading / thumbnail generation is threaded, but it seems that the threads don't yield nicely to the gtk UI thread.

Patches to fix that would be welcome :-) The threading stuff is a bit over my head...

- Mike
Comment 2 Michael Chudobiak 2007-06-29 13:48:33 UTC
Created attachment 90870 [details] [review]
patch to process UI events before thumbnailing

Jason,

Can you test this patch and see if it makes any difference?

- Mike
Comment 3 Jason Tackaberry 2007-06-29 14:35:43 UTC
No difference, unfortunately.

The changes look correct (based on what I recently read) if gth_pixbuf_new_from_uri were actually called from a thread, however (after an admittedly cursory look) I don't see where this function is being called from a separate thread.
Comment 4 Michael Chudobiak 2007-06-29 14:42:04 UTC
Image-loader threads are created in:

libgthumb/image-loader.c:image_loader_init

and thumbnail loading use image-loaders in:

libgthumb/thumb-loader.c:thumb_loader_new

So thumbnailing must be threaded. I think.

However, I'm pretty weak in threading, so corrections are most welcome...


- Mike



Comment 5 Michael Chudobiak 2007-06-29 14:55:49 UTC
Oh, I might be missing the obvious here... the thumbnail *loading* is threaded, but the *generation* might not be. I'll have to stare at the code...

- Mike
Comment 6 Michael Chudobiak 2007-06-29 15:37:44 UTC
No, ignore my last post. Thumbnail generation is threaded. Only one thumbnail thread is running at a time, but it is different than the UI thread. (The image preloader runs 3 threads at a time).

- Mike
Comment 7 Paolo Bacchilega 2007-08-11 14:46:40 UTC
I fixed this some day ago in gthumb-2-10.