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

Improve startup performance #47

Closed
sompylasar opened this issue Dec 1, 2018 · 3 comments
Closed

Improve startup performance #47

sompylasar opened this issue Dec 1, 2018 · 3 comments

Comments

@sompylasar
Copy link

@antonmedv
Copy link
Owner

Cool, but I got error:

Module parse failed: Unexpected character '#' (1:0)
You may need an appropriate loader to handle this file type.
> #!/usr/bin/env node
| 'use strict'
| const os = require('os')

Also I always kept in mind during development focus on startup time (only necessary packages loaded, no cli wrappers like meow, etc) and now startup time should be in 100ms range.

@antonmedv
Copy link
Owner

Actually ncc doesn't provide any speed improvements. Got it compiled:

time echo '{"foo": 1, "bar": 2}' | node dist/index.js .
{
  "foo": 1,
  "bar": 2
}

real	0m0,135s
user	0m0,113s
sys	0m0,021s

Versus fx:

time echo '{"foo": 1, "bar": 2}' | fx .
{
  "foo": 1,
  "bar": 2
}

real	0m0,123s
user	0m0,096s
sys	0m0,026s

So I'm closing it as not needed.

@sompylasar
Copy link
Author

sompylasar commented Dec 1, 2018 via email

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