Merge lp://qastaging/~aacid/ubuntu-ui-toolkit/prefer_image_if_it_exists into lp://qastaging/ubuntu-ui-toolkit/staging

Proposed by Albert Astals Cid
Status: Merged
Approved by: Cris Dywan
Approved revision: 2038
Merged at revision: 2038
Proposed branch: lp://qastaging/~aacid/ubuntu-ui-toolkit/prefer_image_if_it_exists
Merge into: lp://qastaging/ubuntu-ui-toolkit/staging
Diff against target: 55 lines (+11/-12)
1 file modified
src/Ubuntu/UbuntuToolkit/ucunits.cpp (+11/-12)
To merge this branch: bzr merge lp://qastaging/~aacid/ubuntu-ui-toolkit/prefer_image_if_it_exists
Reviewer Review Type Date Requested Status
ubuntu-sdk-build-bot continuous-integration Approve
Cris Dywan Approve
Andrea Bernabei (community) Approve
Review via email: mp+300488@code.qastaging.launchpad.net

Commit message

UCUnits::resolveResource: Prefer image path if it exists

This saves searching the disk for @gu images, which is a big speedup

According to callgrind loading 100 images from a folder that contains 380 images goes from
around 3 million instructions per UCUnits::resolveResource call down to around 10 thousand

This optimization is ok since it is not correct to ship both
        image.png
and
        image@20.png
you either have to ship gu-enabled files or not, but mixing them is not allowed.

Searched for cases in which that may be happening in my phone and found none.

To post a comment you must log in.
2037. By Albert Astals Cid

Remove this, we already checked it above

Revision history for this message
Andrea Bernabei (faenil) :
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
2038. By Albert Astals Cid

QString("1") + "/" -> QStringLiteral("1/")

Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Andrea Bernabei (faenil) wrote :

great speedup (for the case when the asset only has .png and not @GU optimized versions)

thanks a lot!

review: Approve
Revision history for this message
Cris Dywan (kalikiana) wrote :

Splendid. Thanks for discussing and implementing the fix!

review: Approve
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches