-
Notifications
You must be signed in to change notification settings - Fork 1k
Compression with fix for #1191 & #1192 #1200
Conversation
7d045da
to
31e408f
Compare
b237f71
to
13d6fc4
Compare
77d2914
to
3d37021
Compare
fixes also #1202 |
I am doing a line-by-line review. It would take some time. The change is giant. I think it would make it easier to review if we can split some less related changes to separate commits, and possibly get them merged first. Additionally, I am thinking about a fd-mapping approach to replace the |
I would like to re-review the compression change. A giant change is not reviewable, and it would be easier to review if we split it into several smaller changes. We can also get some changes that are not directly related to compression merged first. |
That makes sense to unsquash and reorganise the commit while we are here! Agreed |
Great! Please review #1204 when you have time. |
Nice work, I'm really looking forward to the compression feature. I'm using Globalize.js and it requires a lot of CLDR JSON data, that increases the size of the bundle a lot, so compression would come in very handy :-) I think it would be good to also be able to configure the compression using package.json / x.config.json, like you can do for all the other parameters... |
Unfortunately, the code as it is here now doesn't seem to work with my application.
I'd provide more logs but there are none |
@Hypfer => fixed now |
I tried this patch with mathjax-node-cli and I didn't find any issue. Something unexpected is how slow is Brotli:
Steps to reproduce
Also, please consider adding LZ4. Since most of the compressed data are JavaScript files, with maximum compression level it is close to Gzip, but much faster. Example: # find -type f -name '*js' -exec cat {} + > /tmp/big.js
# ls -sh /tmp/big.js
90M /tmp/big.js
# time lz4 -9 < /tmp/big.js | wc -c | numfmt --to=iec
20M
real 0m2.814s
user 0m2.787s
sys 0m0.026s
# time gzip -9 < /tmp/big.js | wc -c | numfmt --to=iec
17M
real 0m5.421s
user 0m5.380s
sys 0m0.047s |
@ayosec LZ4 is not built-in nodejs and would be difficult to implement. Feel free to propose a PR if you are inspired. |
@erossignon Can confirm. Thank you! Q: Since pkg is now using os.tmpdir() which often is a ramdisk to uncompress all/some(?) files, is there any rough estimate regarding memory overhead of using compression? |
Note on c:
|
b33efb7
to
8e4b63b
Compare
8e4b63b
to
4c98af3
Compare
b044246
to
aecd42d
Compare
@leerob We can release v5.2.2. |
No description provided.