Open sohkai opened 6 years ago
I was surprised js-ipfs-api
turns out to be so big. I compiled it from scratch and can confirm a similar file size with latest master
.
However, looking at the build artifact, we notice quickly, that it seems to bundle all 3rd-party dependencies as well (promisify, Buffer polyfills etc.)
So I'm pretty sure there are some low hanging fruits on their side to optimize build size but I'm not aware what their plans are in this regard. Maybe worth starting a discussion over at their repo?
@PascalPrecht it's definitely worth it to start a conversation, but they use a number of crypto dependencies that are quite large by themselves so the low hanging fruit might not end up making it much smaller.
If the only thing you are doing is cat
or add
files - then this is a much smaller alternative : https://www.npmjs.com/package/ipfs-mini
Another small thing we could do is to use just a particular submodule (in this case, files-regular
).
taking this on
PR opened here: https://github.com/aragon/apm.js/pull/53
js-ipfs-api
is hugeIf we try to use this dependency, and it's not available, we should throw an error.