aragon / apm.js

JavaScript library for the Aragon Package Manager
GNU Lesser General Public License v3.0
16 stars 9 forks source link

Make dependency on js-ipfs-api optional #23

Open sohkai opened 6 years ago

sohkai commented 6 years ago

js-ipfs-api is huge

image

If we try to use this dependency, and it's not available, we should throw an error.

0x-r4bbit commented 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?

sohkai commented 6 years ago

@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.

sponnet commented 6 years ago

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

sohkai commented 5 years ago

Another small thing we could do is to use just a particular submodule (in this case, files-regular).

c0rv0s commented 3 years ago

taking this on

c0rv0s commented 3 years ago

PR opened here: https://github.com/aragon/apm.js/pull/53