Hacker News new | past | comments | ask | show | jobs | submit login

Regarding the very slow babel 6.0.2 timings - something odd is going on. I removed the babel 6.0.2 install, installed node 5.0.0 which ships with npm 3.3.6, ran the install commands at the top of this thread and the babel 6.0.2 speed reached parity with babel 5.8 - both babel versions ran at around 0.55s.

(edit) Then I leave the babel 6.0.2 install as is and then run it against a node 4.2.1 binary - the babel 6.0.2 speed is once again 0.55s - no difference.

So I removed both the node 5.0.0 and babel 6.0.2 installs, re-installed node 4.2.1 with npm 2.14.7 and ran the following commands:

  npm install babel
  npm install babel-cli
  npm install babel-preset-es2015
  node_modules/.bin/babel -V
  6.0.2 (babel-core 6.0.2)
  echo "class Foo {}" | time node_modules/.bin/babel --presets es2015
    2.55 real, 2.37 user, 0.23 sys
So the babel 6.0.2 speed difference is not due the node version, but may have something to do with the different npm versions and how they install node_modules, or the fact that I installed the modules one at a time.

Using Mac OS X 10.9.5 if it matters.




Babel 6.0.2 slowness reproduced on Ubuntu 14.04 using only node 4.2.1 and npm 2.14.7:

  $ uname -v
  #94-Ubuntu SMP Thu Jun 18 00:27:10 UTC 2015
  $ node -v
  v4.2.1
  $ npm -v
  2.14.7
  $ npm install babel
  $ npm install babel-cli
  $ npm install babel-preset-es2015
  $ node_modules/.bin/babel -V
  6.0.2 (babel-core 6.0.2)
  $ echo "class Foo {}" | time node_modules/.bin/babel --presets es2015
  2.49user 0.12system 0:02.58elapsed 101%CPU
Compared to babel 5.8.23 on same Linux VM:

  $ babel -V
  5.8.23 (babel-core 5.8.24)
  $ echo "class Foo {}" | time babel
  0.58user 0.02system 0:00.57elapsed 106%CPU


So I've isolated the problem - babel 6.0.2 installed with npm 2.14.7 is slow, and when installed with npm 3.3.6 is fast. OS and node version is not a factor.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: