Image provider blocking the UI thread
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Thumbnailer |
Fix Released
|
High
|
Albert Astals Cid | ||
thumbnailer (Ubuntu) |
Fix Released
|
High
|
Albert Astals Cid |
Bug Description
Steps:
* add some music to your device (phone or desktop is fine)
* [on desktop] install unity8 and run "unity8-dash -mousetouch"
* bottom-swipe to the Manage screen
* select the "My Music" scope
* scroll quickly
Expected:
* scope scrolls smoothly, even if there's no images
Current:
* scope scrolling blocked for seconds at a time
This seems to be most visible the first time, when images are not cached on disk yet.
AFAIK the impact of this is elevated by the fact that Qt serializes requests to image providers, so when it's blocked to download one image, it will not continue to the next image etc.
ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: qtdeclarative5-
Uname: Linux 3.18.0-
ApportVersion: 2.15.1-0ubuntu2
Architecture: amd64
CurrentDesktop: Unity
Date: Tue Jan 13 14:26:35 2015
SourcePackage: thumbnailer
SystemImageInfo:
current build number: 0
device name:
channel: daily
last update: Unknown
UpgradeStatus: No upgrade log present (probably fresh install)
Related branches
- Victor Thompson (community): Approve
- Michi Henning (community): Approve
- PS Jenkins bot (community): Approve (continuous-integration)
- Jussi Pakkanen (community): Approve
-
Diff: 109 lines (+26/-8)4 files modifiedplugins/Ubuntu/Thumbnailer/albumartgenerator.cpp (+9/-3)
plugins/Ubuntu/Thumbnailer/albumartgenerator.h (+4/-1)
plugins/Ubuntu/Thumbnailer/artistartgenerator.cpp (+9/-3)
plugins/Ubuntu/Thumbnailer/artistartgenerator.h (+4/-1)
Changed in thumbnailer (Ubuntu): | |
status: | New → In Progress |
importance: | Undecided → Critical |
importance: | Critical → High |
assignee: | nobody → Albert Astals Cid (aacid) |
Changed in thumbnailer: | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Albert Astals Cid (aacid) |
Changed in thumbnailer: | |
status: | In Progress → Fix Released |
Qt's documentation says this:
To force asynchronous image loading, even for image sources that do not have the asynchronous property set to true, you may pass the QQuickImageProv ider::ForceAsyn chronousImageLo ading flag to the image provider constructor. This ensures that all image requests for the provider are handled in a separate thread.
This is exactly what thumbnailer does (thumbnailgener ator.cpp: 29). This should make it fully asynchronous. All threading related to this is done by Qt internals and they are not exposed to QQuickImageProv iders. This would indicate that the blocking happens somewhere inside Qt and thus is not caused by thumbnailer.