Open Bug 837110 Opened 11 years ago Updated 1 year ago

Use snappy or lz4 instead of zlib for compressing js source

Categories

(Core :: JavaScript Engine, defect)

defect

Tracking

()

People

(Reporter: jrmuizel, Unassigned)

References

Details

JS source compression shows up noticeably when starting the email app (see bug 836515)

In the quick measurements that I did, fast lz compressors tend to be about 10x faster and produce output that's about 1.5x bigger when run on minified js source. This is probably a trade off worth taking at least for single core cpus.
Here are some actual numbers from on ARM on gaia-email-opt.js

time ./snzip -c /home/jrmuizel/gaia-email-opt.js  > /dev/null
real	0m0.123s

time gzip -c /home/jrmuizel/gaia-email-opt.js  > /dev/null
real	0m0.737s

size:
snappy: 522077
gzip:   328346
Blocks: 885908
If you choose to compress JS sources with Snappy, you may also want to fix bug 768074 (update our in-tree copy of Snappy to get their ARM optimizations).
OS: Mac OS X → All
Hardware: x86 → All
See Also: → 768074
now LZ4 it support also strems

http://fastcompression.blogspot.it/p/lz4.html
Assignee: general → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.