86kb increase in Chrome.apk |
||||||||
Issue descriptionNot sure why an alert didn't fire (+sullivan in case she knows?) Graph: https://chromeperf.appspot.com/report?sid=cfc29eed1238fd38fb5e6cf83bdba6c619be621b606e03e5dfc2e99db14c418b&rev=443364 This Skia roll caused a 86kb jump in libchrome.so on Android: https://chromium.googlesource.com/chromium/src/+/abe52699a2afc8416c810c73d5dbff94f60b1561 My best guess at the culprit is: https://skia-review.googlesource.com/6260 (Use RasterPipeline to support full precision on 16-bit RGBA pngs) It's not obvious to me by looking at the diff why the change was so big though... Matt - do you think this is the right change to blame here? (if not, please assign back to me and I will verify) Matt - does Skia have any stand-alone executables or shared libs that can be used to track its binary size?
,
Jan 16 2017
Looked into this a bit more by: 1. Compiling with & without the patch in question (reverted it within //third_party/skia) 2. Ran on both copies of libchrome.so: nm --size-sort --reverse-sort --demangle --synthetic lib.unstripped/libchrome.so | perl -p -e 's/constprop.*?\]/constprop]/g' > nm.out 3. Diff'ed with: diff a/nm.out b/nm.out | grep '^>' diff a/nm.out b/nm.out | grep '^<' I've attached the outputs.
,
Jan 16 2017
Some analysis: - < prefix is with the new CL (> is with it reverted) - There are 23 fewer symbols - Sanity checked that the sum of the adds vs sum of removed = 85,076 - sum(color_xform_RGBA) is 88kb larger after vs before So, my best guess is that this is a case of template explosion. Matt - I'm not sure how to test performance of these things, but from inspection it looks like only kAlphaType and kCSM are used within the loops of color_xform_RGBA. Would you be able to see if converting template parameters to normal parameters would reduce codesize while maintaining adequate performance? From looking at the file: - kDst and kSrc look to not be used inside the loops - kCSM and kAlphaType are used, but maybe further savings could be had if the loops are pulled into a separate (templated) helper, and the color_xform_RGBA be changed to have no template parameters? - And maybe ever further savings by converting most other non-loop-containing functions in the file? Note for future reader: Summing up of hex columns done via: diff binsize.orig/nm.out binsize/nm.out |grep '^<' | grep color_xform_RGBA | cut -c3-10 | paste -sd+ - | tr 'a-z' 'A-Z' | cat <(echo "ibase=16;") - | bc
,
Jan 16 2017
,
Jan 19 2017
,
Jan 19 2017
About why the alert didn't fire--looks like it actually did fire, but misplaced at r443362. Unfortunately, the perf sheriff marked it as ignored. I think that likely happened because they assumed 86kib was not a big deal. +benhenry for ideas on how to prevent this happening in the future?
,
Feb 13 2017
,
Feb 13 2017
,
Feb 23 2017
Seems like this is maybe fixed by https://skia-review.googlesource.com/c/8848/? It reduced the binary size by 172100 bytes
,
Feb 23 2017
Woohoo, yes! Do you know what that translates to in terms on apk size?
,
Feb 23 2017
We store the native library uncompressed, so the apk size change is the same.
,
Feb 23 2017
Ahh thanks, I misread bytes vs. kilobytes - so we've decreased apk by 168 kb.
,
May 9 2017
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by msar...@google.com
, Jan 13 2017