Opened 5 years ago

Last modified 23 months ago

#15710 new enhancement

Consider enabling the BCJ filter when packaging bundles.

Reported by: yawning Owned by: tbb-team
Priority: Low Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: xz, bundle, size, tbb-rbm
Cc: gk Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

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.)

Child Tickets

Change History (3)

comment:1 Changed 5 years ago by gk

Cc: gk added
Keywords: tbb-gitian added; gitian removed

comment:2 Changed 2 years ago by gk

Keywords: tbb-rbm added; tbb-gitian removed

Moving over to rbm

comment:3 Changed 23 months ago by teor

Severity: Normal

Set all open tickets without a severity to "Normal"

Note: See TracTickets for help on using tickets.