Merge lp:~nik90/ubuntu-clock-app/migrate-stopwatch-utils-c++ into lp:ubuntu-clock-app
Status: | Merged |
---|---|
Approved by: | Bartosz Kosiorek |
Approved revision: | 367 |
Merged at revision: | 361 |
Proposed branch: | lp:~nik90/ubuntu-clock-app/migrate-stopwatch-utils-c++ |
Merge into: | lp:ubuntu-clock-app |
Diff against target: |
498 lines (+163/-113) 11 files modified
app/stopwatch/CMakeLists.txt (+0/-1) app/stopwatch/LapListView.qml (+7/-6) app/stopwatch/StopwatchFace.qml (+5/-4) app/stopwatch/StopwatchPage.qml (+1/-1) app/stopwatch/StopwatchUtils.qml (+0/-73) backend/CMakeLists.txt (+13/-12) backend/modules/Stopwatch/backend.cpp (+3/-1) backend/modules/Stopwatch/formattime.cpp (+78/-0) backend/modules/Stopwatch/formattime.h (+38/-0) backend/modules/Stopwatch/qmldir (+2/-2) tests/unit/tst_stopwatchUtils.qml (+16/-13) |
To merge this branch: | bzr merge lp:~nik90/ubuntu-clock-app/migrate-stopwatch-utils-c++ |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Bartosz Kosiorek | Approve | ||
Ubuntu Phone Apps Jenkins Bot | continuous-integration | Approve | |
Review via email: mp+269051@code.launchpad.net |
Commit message
Converted StopwatchUtils.qml functions to C++ functions to shave loading times and improve performance by a tiny bit.
Description of the change
This MP converts the StopwatchUtils.qml functions to C++ functions for the following reasons,
When I ran stopwatch using Qt Profiler, I noticed that StopwatchUtils{} takes around 60 ms to load, and each function call within takes an average of 200 microsecond. On converting this to c++, the load time reduces to 500 microseconds, so from 60ms->500micros
While the performance shaving are quite small, it raises the question as to why not do this change? I see no disadvantages. Nothing in the qml side needs to be changed, unit tests pass. Regression free!
PASSED: Continuous integration, rev:363 91.189. 93.70:8080/ job/ubuntu- clock-app- ci/811/ 91.189. 93.70:8080/ job/ubuntu- clock-app- vivid-amd64- ci/156
http://
Executed test runs:
SUCCESS: http://
Click here to trigger a rebuild: 91.189. 93.70:8080/ job/ubuntu- clock-app- ci/811/ rebuild
http://