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

babel-core npm install extremely slow (T7563) #4460

Closed
babel-bot opened this issue Aug 18, 2016 · 5 comments
Closed

babel-core npm install extremely slow (T7563) #4460

babel-bot opened this issue Aug 18, 2016 · 5 comments
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Comments

@babel-bot
Copy link
Collaborator

Issue originally made by @jhicken

Bug information

  • Babel version: 6.10.4
  • Node version: 6.3.0
  • npm version: 3.10.5

Description

Using slow-deps package you can see that using babel-core takes almost 3 min to install. That seems like a pretty long space of time. I don't know if its due to compilation or http requests. but it seems ungood.

output from my app

Analyzing 90 dependencies...

[====================] 100% 0.0s

| Dependency | Time | Size | # Deps |

| babel-core | 2m 55.9s | 5.9 MB | 53 |
| @kadira/storybook | 1m 5.2s | 43 MB | 357 |
| gulp-imagemin | 1m 0.7s | 9.5 MB | 299 |
| reactcards | 57.1s | 37 MB | 381 |

@hzoo
Copy link
Member

hzoo commented Sep 7, 2016

slow-deps uses uncached time and most babel dependencies are internal babel-* packages.

I think the best we can do atm the moment is remove babel-runtime when it's not needed, and maybe check if there's circular deps. Not sure we want to do bundleDeps @nolanlawson

@nolanlawson
Copy link

I haven't tried bundleDeps myself, but you might ping Dan Abramov since he used it for create-react-app and got some decent perf wins: facebook/create-react-app#41 (comment)

TBH it might not buy you much though. Based on the output above, babel-core has a relatively small size and small number of deps (compared to @kadira/storybook and gulp-imagemin anyway) and yet still takes longer to install. Maybe it's a native dep with a heavy postinstall or something? Would also be worth knowing the architecture, since e.g. fsevents acts differently on macOS vs others.

Also yeah slow-deps measures uncached times and doesn't count de-duping, so it's a rough measure at best.

@hzoo
Copy link
Member

hzoo commented Sep 7, 2016

babel-cli might be different since it has even more stuff (--watch support). npm/npm#9920 would be useful to check so we can figure out what is the issue. It's actually funny that babel is the example there. I know core-js, source-map can be big

@hzoo
Copy link
Member

hzoo commented Sep 12, 2016

With nolan's suggestion I ran: https://gist.github.com/hzoo/61a55fbe087f8cda98b8788a4b63dcc4.

Also reading the OP again, it has nothing to do with compilation because babel doesn't compile on install

@hzoo
Copy link
Member

hzoo commented Jan 17, 2017

Closing this as it would be an ongoing issue - I've already tried looking at deps for a long time now (without much luck) and #5118. Hopefully that is a quick win because otherwise it hasn't been a fruitful use of time

@hzoo hzoo closed this as completed Jan 17, 2017
@lock lock bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label May 5, 2018
@lock lock bot locked as resolved and limited conversation to collaborators May 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue
Projects
None yet
Development

No branches or pull requests

3 participants