Trimming bzr package size
Brad Schick
schickb at gmail.com
Tue Jun 9 06:35:02 BST 2009
I am deploying bzr 1.15 on Ubuntu Linux systems and noticed that the PPA
for bzr 1.15 is rather large for a command-line tools (currently just
over 5MB). Somewhat ironically, I noticed this due to much slower repo
clones after pushing bzr's .dep into a bzr repository. Looking into this
a bit, I found that most of the bulk is in the docs:
/usr/share/doc/bzr$ du -h
288K ./txt/developers
24K ./txt/en/developer-guide
116K ./txt/en/release-notes
4.0K ./txt/en/mini-tutorial
28K ./txt/en/tutorials
172K ./txt/en/user-reference
212K ./txt/en/user-guide
4.0K ./txt/en/admin-guide
560K ./txt/en
4.0K ./txt/es/mini-tutorial
12K ./txt/es/guia-usuario
16K ./txt/es
876K ./txt
1.4M ./html/developers
88K ./html/en/developer-guide
504K ./html/en/release-notes
16K ./html/en/mini-tutorial
1.2M ./html/en/quick-reference
84K ./html/en/tutorials
336K ./html/en/user-reference
276K ./html/en/user-guide/images
516K ./html/en/user-guide
2.7M ./html/en
16K ./html/es/mini-tutorial
16K ./html/es
4.0M ./html
5.0M .
In particular, there are two 24 bit PNG images that add up to 1.3MB alone.
700K ./html/developers/performance.png
644K ./html/en/quick-reference/quick-start-summary.png
A few ideas:
- Many debian/ubuntu packages provide non-essential documentation in
separate "-doc" packages. This might be a good idea for bzr. In
particular the developer docs, but I'd actually prefer everythiny except
man/info pages be extracted.
- Both of those large PNG images can be reduced by 50% or more by
converting them to indexed (quantized) images. Currently they are 24bit
RGBs. For example, I can't personally see any different after running
"convert performance.png +dither -colors 32 performance_indexed.png".
And the result is 537K smaller!
- Other smaller PNGs don't convert so well perhaps due to lots of
anti-aliasing. Although not as important, it seems like those could be
simplified and indexed as well.
-Brad
More information about the bazaar
mailing list