← Back to team overview

bzr-windows team mailing list archive

Compressing library.zip is probably not worth it

 

Short, unscientific testing on my work laptop.

Note that it's bogged down with all the usual corporate antiviral
leechware, which I suppose makes it more representative of a typical
Windows machine :-)

Tested 100 startups (in quick succession) to get an average time [1]

Results (in average ms per iteration of bzr rocks) :

156# & 'C:\Program Files\Bazaar\lib\test-bzr-starttime.ps1'
Store (16MB) : 318.26
Deflate (5.8MB) : 335.52

So ; the difference is around 20ms or 6-7% of startup time, which isn't
much, but slightly worse.

10MB of disk space no one is going to miss.

Inno Setup uses solid LZMA. The "Store" version of the zip LZMAs better
than the "Deflate" version.

MSI uses Deflate AFAICR.

Since the file is "Store" it should actually deflate better than the
equivalent folder (it does, 4.9MB vs 5.8MB)

So - compressing the library.zip file, all round a silly idea.



# Bah, no extra credit for thoroughness
LZMA  : Doesn't work.
BZIP2 : Doesn't work either

[1] Windows Powershell script

# test-bzr-starttime.ps1
cp -force library.store.zip library.zip

$total = 0
$count = 100


for ( $ii = 0 ; $ii -lt $count ; $ii ++ ) {
    $total += (measure-command { bzr rocks }).Milliseconds
}

"Store : " + ($total / $count)

$total = 0

cp -force library.deflate.zip library.zip


for ( $ii = 0 ; $ii -lt $count ; $ii ++ ) {
    $total += (measure-command { bzr rocks }).Milliseconds
}

"Deflate : " + ($total / $count)



Follow ups