Bug 1275672 - Change symbols compression format to MSZIP; r=ted

makecab.exe has 3 options for compression: disable, MSZIP, and LZX.

Here is a breakdown of the 3 levels of compression for an opt 32-bit
build on my i7-6700K:

       directory size     full.zip   xul.pd_  `buildsymbols`
None     1,360 MB          227 MB     146 MB        49s
MSZIP      520 MB          221 MB     142 MB       113s
LZX        436 MB          169 MB     102 MB       248s

(The original size of xul.pdb is ~500 MB.)

This commit switches us to MSZIP as the compression format. This
makes `builsymbols` >2x faster while only increasing the full zip
archive size by ~31%. This feels like an appropriate trade-off.

The memory related flag has been removed because it only applies
to LZX compression.

It's worth noting that using `zip` to compress xul.pdb and xul.sym:

Level  Zip Size    xul.pdb Compressed   Time
9        160.6 MB      139.8 MB         76s
7        161.4 MB      140.5 MB         30s
5        164.7 MB      143.2 MB         16s
4        170.0 MB      147.3 MB         12s
3        176.4 MB      151.6 MB         11s

So "MSZIP" compression appears to be using level 9. If we could swap
in our own cab generator that uses a zlib compression level less
than 9, we'll make symbol generation significantly faster without
sacrificing too much size. I'm inclined to punt that to a follow-up
bug.

MozReview-Commit-ID: GbbClkn9PLN

--HG--
extra : rebase_source : 05f94f381a892d82f512b5c3682e51f6735714f3
This commit is contained in:
Gregory Szorc 2016-05-27 16:03:58 -07:00
Родитель a5fc6a819f
Коммит 72878ea229
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -785,8 +785,7 @@ class Dumper_Win32(Dumper):
compressed_file = path[:-1] + '_'
# ignore makecab's output
success = subprocess.call(["makecab.exe", "/D",
"CompressionType=LZX", "/D",
"CompressionMemory=21",
"CompressionType=MSZIP", "/D",
path, compressed_file],
stdout=open(os.devnull, 'w'),
stderr=subprocess.STDOUT)