Thumbnail generation is slow when requesting a sourceSize that needs to be rescaled
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical System Image |
Fix Released
|
High
|
Unassigned | ||
Thumbnailer |
Fix Released
|
Undecided
|
Unassigned | ||
thumbnailer (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
thumbnailer (Ubuntu RTM) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The music app sets the "sourceSize" property of the Image component used for the Thumbnailer image provider. The values used are based on the size of the displayed image. For instance, on a Nexus 4 in the Music app's Albums tab this appears to be either "330" or "165" depending on if it is the full image or if is part of a quadrant/grid. However, setting the sourceSize to these values causes the thumbnailing processing to be extremely slow. Simply requesting that the source be 512 (which is the size of the xlarge) art is much faster--because I assume the image is not resized.
One or both of the following could/should be done 1) the resizing needs to be made significantly faster, and/or 2) there needs to be an API that provides a property so users of the Thumbnailer can request sizes of 128 (normal), 256 (large), or 512 (xlarge). Hardcoding these values in the app would cause regression if the Thumbnailing service ever changed the corresponding default sizes. Ideally I think both of these enhancements should be made.
Related branches
- Ubuntu Phone Apps Jenkins Bot: Approve (continuous-integration)
- Andrew Hayzen: Approve
-
Diff: 49 lines (+21/-4)2 files modifiedcommon/BlurredBackground.qml (+12/-2)
common/CoverGrid.qml (+9/-2)
- PS Jenkins bot (community): Approve (continuous-integration)
- Jussi Pakkanen (community): Approve
-
Diff: 36 lines (+18/-1)1 file modifiedplugins/Ubuntu/Thumbnailer/thumbnailgenerator.cpp (+18/-1)
Changed in canonical-devices-system-image: | |
importance: | Undecided → High |
milestone: | none → ww05-2015 |
status: | New → In Progress |
Changed in canonical-devices-system-image: | |
milestone: | ww05-2015 → ww07-2015 |
Changed in canonical-devices-system-image: | |
status: | In Progress → Fix Released |
Changed in thumbnailer: | |
status: | New → Fix Released |
Image scaling is done by external libraries such as Qt, so thumbnailer can't really do much to make it faster. I'd imagine those libraries are already relatively fine tuned.
The image sizes that the thumbnailer stores come from the freedesktop.org thumbnailing standard. It has not changed in years and is not expected to. So the simplest thing is to just grab the size that is the fastest.