Merge lp:~ahayzen/music-app/remix-fix-1386628-slow-trackclicked into lp:music-app/remix
Status: | Merged |
---|---|
Approved by: | Victor Thompson |
Approved revision: | 715 |
Merged at revision: | 717 |
Proposed branch: | lp:~ahayzen/music-app/remix-fix-1386628-slow-trackclicked |
Merge into: | lp:music-app/remix |
Diff against target: |
49 lines (+9/-12) 2 files modified
meta-database.js (+3/-10) music-app.qml (+6/-2) |
To merge this branch: | bzr merge lp:~ahayzen/music-app/remix-fix-1386628-slow-trackclicked |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Victor Thompson | Approve | ||
Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve | |
Review via email: mp+239905@code.launchpad.net |
Commit message
* Optimise the addQueueList transaction
Description of the change
* Optimise the addQueueList transaction
This reduces the overall time from the track being clicking to playing from ~2.4s -> 1.1s on my N4. The remaining time is split up over the following:
* model.clear() ~75ms
* addQueueFromModel() ~325ms (110ms going to addQueueList [was 1000ms+ before] the rest append to trackQueue)
* MediaPlayer.play() ~450ms
* pushNowPlaying() ~300ms
I attempted to use a worker script to speed up the appending to trackQueue, but that actually resulted in slow down. The next areas of investigation should probably be why MediaPlayer.play() takes 450ms (we should compare on desktop as well as device [note MediaPlayer takes 175ms to create as well]) and investigate incubateObject for pushNowPlaying(). Maybe the page could be incubating while we are pushing to the model?
TL;DR; this MP reduces the trackClicked time by ~2.4->1.1 in a certain scenario but there are still areas for improvement.
PASSED: Continuous integration, rev:714 91.189. 93.70:8080/ job/music- app-remix- ci/208/ 91.189. 93.70:8080/ job/generic- mediumtests- utopic- python3/ 1357 91.189. 93.70:8080/ job/generic- mediumtests- utopic- python3/ 1357/artifact/ work/output/ *zip*/output. zip 91.189. 93.70:8080/ job/music- app-remix- utopic- amd64-ci/ 208
http://
Executed test runs:
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild: 91.189. 93.70:8080/ job/music- app-remix- ci/208/ rebuild
http://