LiveCD optimisations

Didier Roche didrocks at ubuntu.com
Sat May 22 09:07:26 UTC 2010


Le samedi 22 mai 2010 à 04:31 -0400, Louis Simard a écrit :
> At 2010-05-21 04:41 GMT, Martin Owens <doctormo at gmail.com> wrote:
> > Are there no more things that could be optimised? For instance does
> > using xmllint with --noblanks on the 12496 xml files save any space?
> 
> My testing with XML files is done now, and here are the results! (And
> the modified script, attached to this email)
> 
> 'xmllint --noblanks --nsclean FILE' gives savings of 3 MB
> (pre-squashfs). It actually *enlarges* some files containing non-7-bit
> characters, such as gconf-tree in French (by a bit, due to accented
> chars), Greek and Japanese (by a lot, due to every single text-node
> character being entity'd).
> 
> 'xmllint --noblanks --nsclean --encode utf-8 FILE' gives savings of 10
> MB. It shrinks even the French, Greek and Japanese files.
> 
> On the squashfs'd side, this gives modest savings of 0.79 MB.
> 
> HOWEVER: The optimisations made card games (Klondike etc.) unplayable,
> as no cards appear, due to the change in
> /usr/share/gnome-games-common/cards/gnomangelo_bitmap.svg. Gbrainy
> started crashing when a new game of verbal analogies was started, due
> to xmllint's addition of an <?xml?> tag in
> /usr/share/games/gbrainy/verbal_analogies.xml. Nautilus lost its
> toolbars, icons and right-click menu. The help viewer (System / Help
> and Support) complains that every file is not a well-formed XML
> document. So perhaps XML optimisations aren't so good? :(
> 
> 1379 HTML files could be optimised too, but they might get hopelessly
> mangled by xmllint - is there a utility for that?
> 
> 136 JPEG files... well, those are lossy :)
> 
> 379 GIF files... some are in HTML docs and could be replaced with
> PNGs, but that can't be done automatically, and so the Ubuntu Doc team
> would have to get involved. (the images are so small it's probably not
> worth it, except to get away from the LZW patent...) There are
> spinner/throbber animations in .gif format in some packages (Gwibber,
> Rhythmbox), as well as animated clipart in OpenOffice, which probably
> can't get replaced.
> 
> 1 TIFF
image: /usr/share/app-install/icons/_usr_lib_GNUstep_Applications_GTAMSAnalyzer.app_Resources_largeApp.tif
> - This could become a PNG too.

I think the only relevant data is how much size is gain on the iso
itself (so once mksquashfs is runned). I'm afraid it won't be that much
with the xml + images optimization (is 0.79 MB containing the whole
optimization or just the xml one?) and as you have already triggered,
those optimization are error prone in applications.
Not sure it worths the risk if the real size gain in the iso is only
0.79 MB.

Didier






More information about the Ubuntu-devel-discuss mailing list