Pak file inheritence |
|||||||
Issue descriptionWe copy locale strings into a .pak file for each locale. Sometimes though, there are many duplicated strings with other locales. E.g. fr-CA vs fr. In this case, rather than duplicating all of the strings, we should add both .pak files and have resource lookups fall back to fr.pak when not present in fr-ca.pak. I think the approach here would be to have a repack() step that looked for duplicates, and trimmed them out when found. Then, at runtime add the logic to hook up multiple .pak files. I doubt this will come up enough to have to make it super-generic. We should just hardcode the locales that have parent .pak files. Step 1: Find out how many locales this applies to, and many resources could be trimmed.
,
May 9 2017
,
Jun 28 2017
,
Jul 27 2017
Did some experiments on WebView locales, the size reductions vary depending on locale paks. en-US.pak & en-GB.pak: en-US.pak 7.2kb -> 1.5kb es.pak & en-419.pak: es.pak 9.2kb -> 6.4kb pt-BR.pak & pt-PT.pak: pt-BR.pak 8.3kb -> 6.7kb zh-CN.pak & zh-TW.pak: zh-CN.pak 7.3kb -> 7kb
,
Jul 27 2017
Nice to have some concrete numbers here! Might be better to use chrome pak files though?
,
Jul 27 2017
Here are the results for monochrome pak files: (unzipped) en-US.pak & en-GB.pak: en-US.pak 30.5kb -> 6.5kb es.pak & en-419.pak: es.pak 36.5kb -> 25.5kb pt-BR.pak & pt-PT.pak: pt-BR.pak 34.7kb -> 28.0kb zh-CN.pak & zh-TW.pak: zh-CN.pak 30.8kb -> 27.4kb
,
Jul 28 2017
Start numbers seem a bit low. Should be around 60kb?
,
Jul 28 2017
,
Aug 8 2017
Oops, wrong apk. Correct numbers for MonochromePublic.apk below: en-US.pak & en-GB.pak: en-US.pak 48kb -> 12kb es.pak & es-419.pak: es.pak 57kb -> 44kb pt-BR.pak & pt-PT.pak: pt-BR.pak 56kb -> 48kb zh-CN.pak & zh-TW.pak: zh-CN.pak 47kb -> 43kb
,
Aug 1
,
Jan 21
(2 days ago)
Now that split APKs are happening, the need for this is mostly nullified. According to a triage meeting discussion, we're closing this off. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by agrieve@chromium.org
, Apr 10 2017