New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 710093 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Jan 21
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Pak file inheritence

Project Member Reported by agrieve@chromium.org, Apr 10 2017

Issue description

We 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.
 
Note: somewhat related to  bug 703134 , although that one is solvable by just moving strings into C++
Labels: -binary-size Performance-Size

Comment 3 by zpeng@chromium.org, Jun 28 2017

Blockedon: 732414

Comment 4 by zpeng@chromium.org, Jul 27 2017

Blockedon: -732414
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


Nice to have some concrete numbers here! Might be better to use chrome pak files though?

Comment 6 by zpeng@chromium.org, 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
Start numbers seem a bit low. Should be around 60kb?

Comment 8 by zpeng@chromium.org, Jul 28 2017

Owner: zpeng@chromium.org

Comment 9 by zpeng@chromium.org, 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
Status: Assigned (was: Available)

Comment 11 by cjgrant@chromium.org, Jan 21 (2 days ago)

Status: WontFix (was: Assigned)
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