Thumbnail view implementation is not scalable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Moblin Multimedia |
Fix Released
|
Critical
|
Rusty Lynch |
Bug Description
The current thumbnail view implementation does not scale for large numbers of thumbnails, with the result being excessive memory and CPU load for any realistic workloads.
As an example, I copied 1410 of my personal photos (a sampling of random snapshots from over the last several years) to a device. After starting moblin-media in photo mode for the first time (and letting the app spike CPU usage for way too long a time), I end up with 13M of thumbnails. Since our thumbnail view implementation creates two pixbufs for each thumbnail (with one pixbuf loaded directly out of the thumbnail image on disk, and the other pixbuf scaled up or down as called for by the position of the thumbnail resize slider), then I see memory usage of ~23M just to start the app in photo view mode.
Scrolling the view or attempting to resize the thumbnails max's out the CPU (on a Samsung, so forget about a Menlow device) makes the app unresponsive for seconds at a time (in a fairly unpredictible manner, meaning that sometimes the scroll/resize works like a charm, and other times... not so charming.)
In addition to this, as I resize the thumbnails the memory footprint continues to increase, with each increase never resulting in a decrease (as if we were leaking memory.)
Changed in moblin-multimedia: | |
importance: | Undecided → Critical |
milestone: | none → m9 |
Changed in moblin-multimedia: | |
assignee: | nobody → rusty-lynch-intel |
status: | New → Triaged |
Optimizations to thumbnails view are available in moblin-media v0.35, where we use about have the amount of memory.
FYI: We still have the fundamental issue that each thumbnail loaded into the view cost an amount of memory, and therefore there exist an amount of thumbnails that will overload the app. We should have a stress test that finds that upper bound.