New issue
Advanced search Search tips

Issue 688642 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Nov 7
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug


Show other hotlists

Hotlists containing this issue:
speed-binarysize-backlog


Sign in to add a comment

libphonenumber's data could be made smaller (110kb)

Project Member Reported by agrieve@chromium.org, Feb 4 2017

Issue description

Running nm --size-sort --reverse-sort --radix=d lib.unstripped/libchrome.so
reveals that one of the largest symbols is:
00146178 r i18n::phonenumbers::(anonymous namespace)::data

It turns out that this is an embedded proto file, which is parsed the first time that it's needed.

Since it's just data that is being parsed, there's no benefit to storing it in the .so uncompressed (that I can think of anyways).

In terms of implementing this, we could:
a) Add an option to have the file passed into the library rather than hardcoded as static data
b) Keep it as static data, but compress it

Having the file passed in might have the advantage of smaller patch sizes (speculation)


I tested its compressed size as follows:

cd third_party/libphonenumber/dist/cpp/src/phonenumbers
gcc -fpic -shared -I.. metadata.cc
objdump -h a.out | grep .rodata | awk '{print "dd if='a.out' of='b.out' bs=1 count=$[0x" $3 "] skip=$[0x" $6 "]"}' | bash
gzip < b.out > b.out.gz
../../../../../../out-gn/Release/clang_x64/bro --input b.out --output b.out.bro
zopfli -c b.out > b.out.zop
ls -l b.out*

-rw-r--r-- 1 agrieve eng 158219 Feb  3 21:29 b.out
-rw-r--r-- 1 agrieve eng  43665 Feb  3 21:41 b.out.gz
-rw-r--r-- 1 agrieve eng  41404 Feb  3 21:44 b.out.zop
-rw-r--r-- 1 agrieve eng  37027 Feb  3 21:29 b.out.bro

 
Labels: Performance-Browser
Labels: -apk-size binary-size
Summary: libphonenumber's data could be made smaller (110kb) (was: libphonenumber's data could be made smaller)
Labels: -binary-size Performance-Size

Comment 5 by ma...@chromium.org, Jun 23 2017

Cc: se...@chromium.org
Components: UI>Browser>Autofill

Comment 6 by ma...@chromium.org, May 1 2018

Status: Untriaged (was: Available)
Status: WontFix (was: Untriaged)
This regression has been open for half a year. It's not very actionable and the regression has been in all Chrome user's hands for months.

Sign in to add a comment