Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current Performance #65

Open
victorb opened this issue Sep 25, 2018 · 4 comments
Open

Current Performance #65

victorb opened this issue Sep 25, 2018 · 4 comments

Comments

@victorb
Copy link
Member

victorb commented Sep 25, 2018

Looking into deploying npm-on-ipfs together with the rest of the Jenkins infrastructure to make the npm install a bit faster.

However, preliminary testing on my local machine makes me believe that npm-on-ipfs makes the installs slower, even on second installs (where all packages should be cached) and with npm-on-ipfs running on the same machine, compared to just running npm install connected directly to registry.npmjs.com.

@achingbrain
Copy link
Member

It might not be faster (since we have to do more work to serve a file) but it should be more reliable. The second install thing is interesting, npm should work out versions from the package-lock.json file and install modules from it's own cache, or did you delete it?

Anyway - I'm happy to look into performance more - do you have any figures for this or a test I can replicate?

@victorb
Copy link
Member Author

victorb commented Sep 25, 2018

The way I tested it was something like this (in js-ipfs & removing package-lock.json as we currently don't have it):

rm -rf node_modules/ package-lock.json || true
npm install --cache=$(mktemp -d) --registry=https://registry.npmjs.com

And repeat again but replacing the registry with local URL.

First run with npm-on-ipfs took 4 minutes, but that's understandable as it has to download the package, add it to IPFS and then serve it. But I would expect the second run to take similar amount of time as normal npm install.

@olizilla
Copy link
Member

WIP on tests for performance: #103

Currently only tests for first install speed, but it'd be very useful for on-boarding folks if we can improve that

@andrew
Copy link
Contributor

andrew commented May 15, 2019

Some other relevant performance measurements made by @achingbrain over here: zkat/pacote#173 (comment)

The most surprising one was "Local IPFS node that already has the tarball: Avg: 1022.4ms" compared with 830ms to make a http request to a server on the internet for the same content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants