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

jp-babel slow on first eval after kernel start #4

Closed
gnl opened this issue Dec 23, 2015 · 3 comments
Closed

jp-babel slow on first eval after kernel start #4

gnl opened this issue Dec 23, 2015 · 3 comments

Comments

@gnl
Copy link

gnl commented Dec 23, 2015

jp-babel seems to take about 10-15 seconds on the first eval with a fresh kernel (even on something simple as 1+2) as opposed to ijavascript's almost immediate evaluation.

Any way to speed this up?

@n-riesco
Copy link
Owner

I started to notice a slowdown after I upgraded jp-babel to use Babel v6,
but not as as slow as 10-15 seconds. I was hoping using babel-node will
solve this issue. In the meantime, I would recommend to use jp-babel@0.0.6
that depends on Babel v5:

sudo npm install -g jp-babel@0.0.6

@n-riesco
Copy link
Owner

@gnl Is this still as bad as 10-15 seconds for you?

I'm using:

$ npm install -g jp-babel
/home/user/bin/jp-babel -> /home/user/lib/node_modules/jp-babel/bin/jp-babel.js
/home/user/lib
└─┬ jp-babel@0.0.9 
  ├─┬ babel-core@6.13.2 
  │ ├── babel-traverse@6.13.0 
  │ ├── babel-types@6.13.0 
  │ ├── lodash@4.14.2 
  │ └── minimatch@3.0.3 
  └─┬ babel-preset-es2015@6.13.2 
    ├── babel-plugin-transform-es2015-modules-amd@6.8.0 
    ├── babel-plugin-transform-es2015-modules-systemjs@6.12.0 
    ├── babel-plugin-transform-es2015-modules-umd@6.12.0 
    └─┬ babel-plugin-transform-regenerator@6.11.4
      └── babel-plugin-syntax-async-functions@6.13.0 

and I notice a delay of a few seconds only.

@n-riesco
Copy link
Owner

I could reproduce this issue on a machine using npm 2.

Using npm dedupe or npm 3, as suggested here, helped me reduce the time to initialise babel to a few seconds.

n-riesco added a commit that referenced this issue Apr 17, 2017
* Use babel-preset-env with `targets.node` set to true.

* The preset babel-preset-latest has been deprecated.

Fixes #4
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

2 participants