[tbb-bugs] #15710 [Tor Browser]: Consider enabling the BCJ filter when packaging bundles.
Tor Bug Tracker & Wiki
blackhole at torproject.org
Fri Apr 17 05:52:49 UTC 2015
#15710: Consider enabling the BCJ filter when packaging bundles.
-------------------------------------+--------------------------
Reporter: yawning | Owner: tbb-team
Type: enhancement | Status: new
Priority: minor | Milestone:
Component: Tor Browser | Version:
Keywords: xz, bundle size, gitian | Actual Points:
Parent ID: | Points:
-------------------------------------+--------------------------
xz (and xz embedded) supports branch/call/jump filters that is supposed to
reduce compressed executable size. The documentation hints that the
compression ratio can end up being worse in certain situations, but as far
as I can tell, it helps.
Numbers (tested with `tor-browser-linux64-4.5a5_en-US.tar.xz`):
* Current settings: 43667412 (1.0)
* `xz -9`: 43463244 (0.99)
* `xz --x86 --lzma2`: 42621816 (0.976)
* `xz --x86 --lzma2=preset=9`: 42402308 (0.971)
The "extreme" setting doesn't help the bundle compression enough to be
worth it, and it would increase the already long build time even further.
The improvement isn't absolutely massive, but ~1 MiB is ~1 MiB. Since we
only currently build x86(_64) bundles, adding `export XZ_OPT="--x86
--lzma2"` or similar to the top of `dtar.sh` should be sufficient, adjust
presets to taste.
(There is also an Little Endian ARM BCJ filter, along with filters for
architectures that we don't care about.)
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/15710>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tbb-bugs
mailing list