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 633644 - Limit amount of clip thumbnails to 2 per second
Limit amount of clip thumbnails to 2 per second
Status: RESOLVED FIXED
Product: pitivi
Classification: Other
Component: Timeline
Git
Other Linux
: Normal normal
: 0.14.2
Assigned To: Pitivi maintainers
Pitivi maintainers
Depends on:
Blocks:
 
 
Reported: 2010-10-31 16:09 UTC by Jean-François Fortin Tam
Modified: 2011-08-14 15:27 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jean-François Fortin Tam 2010-10-31 16:09:24 UTC
A significant performance problem with timeline thumbnails occurs when you zoom in a lot: thumbnails are generated "as much/many as possible" to fill the clip space, even if you're zoomed far enough to see individual frames in the ruler.

This causes a performance problem since it does too much work. It generates an almost infinite amount of thumbnails.

I think it would make more sense that it limits the thumbnails to a maximum of 1 every 500ms. We don't need that much precision, scene visuals don't change that much in half a second, typically.
Comment 1 Brandon Lewis 2010-11-03 16:19:59 UTC
have a branch for you to try on my repo
bug_633644_thumbnail_period
Comment 2 Jean-François Fortin Tam 2010-11-03 19:20:54 UTC
This branch is awesome. I did some benchmarking with two projects:
- a "torture test" project in which I imported the 2K MP4 version of Sintel. I'm aware that is not an editing-friendly format, that it is very playback-oriented... which is why it is a very interesting perf test for seeking and thumbnailing.
- my "Texture" (lightweight version) project with "normal" 720p footage

Note I only tested video thumbnailing; I disabled audio waveforms.
I did my measurements with a stopwatch.
My test machine has a Core 2 Quad Q9300 CPU.

Methodology:
1. load the project, wait for the initial thumbnailing to complete
2. seek to a predefined position (ex: 1min00s)
3. middle-click the zoom slider to its far right to "warp" to maximum zoom level
4. start stopwatch
5. wait for thumbs to be generated in the visible area/CPU to drop to ~0%
6. stop the stopwatch


Results (2K Sintel torture test):
- pitivi master (unlimited thumbnails): 12 seconds
- emdash's branch, 1 thumbnail/500ms:   7 seconds
- emdash's branch, 1 thumbnail/1 sec:   3 seconds

Results (720p test):
- pitivi master (unlimited thumbnails): 9 seconds
- emdash's branch, 1 thumbnail/500ms:   2 seconds
- emdash's branch, 1 thumbnail/1 sec:   1 second

Awesome!
Comment 3 Jean-François Fortin Tam 2011-03-28 01:33:24 UTC
Brandon: given that your code seems to cause no regressions and significantly improves performance (I'd even suggest the default setting to be 1 second instead of 0.5), what is missing for you to consider it ready?
Comment 4 Jean-François Fortin Tam 2011-08-08 19:19:02 UTC
commit 5bf443c0a7983950248c0ad88d564e49a3c058c3
Author: Brandon Lewis <brandon_lewis@alum.berkeley.edu>
Date:   Wed Nov 3 15:53:12 2010 +0000

    previewer: allow specifying thumbnail period


commit 3f1bcbba2265a5b3c58cfab060e9ac3660554d2e
Author: Brandon Lewis <brandon_lewis@alum.berkeley.edu>
Date:   Wed Nov 3 16:18:50 2010 +0000

    previewer: change thumbnail period slider to combo box


commit 88f19d26915d2251ba6ba14dc13bc9e69705f847
Author: Jean-François Fortin Tam <nekohayo@gmail.com>
Date:   Sun Jul 24 23:08:41 2011 -0400

    Increase thumbnailing period to one second for better performance