-
Committer:
Tarmac
-
Author(s):
Albert Astals Cid
-
Date:
2016-07-20 11:53:48 UTC
-
mfrom:
(2035.2.3 staging)
-
Revision ID:
tarmac-20160720115348-ia58knac9bl01j2e
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. Fixes: https://bugs.launchpad.net/bugs/1604029.
Approved by ubuntu-sdk-build-bot, Christian Dywan, Andrea Bernabei.