mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
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:
parent
c726b2f3b2
commit
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;
|
||||
|
Loading…
Reference in New Issue
Block a user