My failed attempt to shrink all NPM packages by 5%
11–20 of 253 posts
Re: My failed attempt to shrink all NPM packages by 5%
#12Its not always obvious who has the most important use cases. In the case of NPM they are prioritizing the user experience of module authors. I totally see how this change would be great for module consumers, yet create potentially massive inconvenience for module authors.
Interesting write-up
Re: My failed attempt to shrink all NPM packages by 5%
#13Working approach, but in the end I abandoned the project - I doubt people care about such js size savings.
Re: My failed attempt to shrink all NPM packages by 5%
#14Re: My failed attempt to shrink all NPM packages by 5%
#15Re: My failed attempt to shrink all NPM packages by 5%
#16My experiment on how to reduce javascript size of every web app by 30-50% : https://github.com/avodonosov/pocl Working approach, but in the end I abandoned the project - I doubt people care about such js size savings.
Re: My failed attempt to shrink all NPM packages by 5%
#17One thing that's excellent about zopfli (apart from being gzip compatible) is how easy it is to bootstrap: git clone https://github.com/google/zopfli.git cc -O2 zopfli/src/zopfli/*.c -lm It just requires a C compiler and linker.
Comparing to gzip isn't really worth it. Combine pigz (threaded) with zlib-ng (simd) and you get decent performance. pigz is used in `docker push`.
For example, gzipping llvm.tar (624MB) takes less than a second for me:
$ time /home/harmen/spack/opt/spack/linux-ubuntu24.04-zen2/gcc-13.2.0/pigz-2.8-5ptdjrmudifhjvhb757ym2bzvgtcsoqc/bin/pigz -k hello.tar
real 0m0.779s
user 0m11.126s
sys 0m0.460s
At the same time, zopfli compiled with -O3 -march=native takes 35 minutes. No wonder it's not popular.It is almost 2700x slower than the state of the art for just 6.8% bytes saved.
Re: My failed attempt to shrink all NPM packages by 5%
#18My experiment on how to reduce javascript size of every web app by 30-50% : https://github.com/avodonosov/pocl Working approach, but in the end I abandoned the project - I doubt people care about such js size savings.
Wdym?? 50% is a big deal
Re: My failed attempt to shrink all NPM packages by 5%
#19> When it was finally my turn, I stammered.
> Watching it back, I cringe a bit. I was wordy, unclear, and unconvincing.
> You can watch my mumbling in the recording
I watched this, and the author was articulate and presented well. The author is too harsh!
Good job for trying to push the boundaries.
Re: My failed attempt to shrink all NPM packages by 5%
#20Props to anyone who tries to make the world a better place. Its not always obvious who has the most important use cases. In the case of NPM they are prioritizing the user experience of module authors. I totally see how this change would be great for module consumers, yet create potentially massive inconvenience for module authors. Interesting write-up
Also, since this is a case of having something compressed once and decompressed potentially thousands of times, it seems like the perfect tool for the job.