зеркало из https://github.com/mozilla/gecko-dev.git
Bug 837715. Reduce compression rate for js source. r=benjamin
This cuts the time to compress gaia-email-opt.js from 0.63 seconds to 0.33 seconds. The result should still be smaller (391K from 321K before) than the compressing with snappy or lz4 (528K), but decompression time will be worse. Fortunately, this will only penalize Function.toSource() which I think is an ok trade off. --HG-- extra : rebase_source : 00c9e38fa2099ed03dc24aea9582f48423fe3a1b
This commit is contained in:
Родитель
c726b2f3b2
Коммит
8b81bcc67c
|
@ -73,7 +73,10 @@ Compressor::init()
|
|||
{
|
||||
if (inplen >= UINT32_MAX)
|
||||
return false;
|
||||
int ret = deflateInit(&zs, Z_DEFAULT_COMPRESSION);
|
||||
// zlib is slow and we'd rather be done compression sooner
|
||||
// even if it means decompression is slower which penalizes
|
||||
// Function.toString()
|
||||
int ret = deflateInit(&zs, Z_BEST_SPEED);
|
||||
if (ret != Z_OK) {
|
||||
JS_ASSERT(ret == Z_MEM_ERROR);
|
||||
return false;
|
||||
|
|
Загрузка…
Ссылка в новой задаче