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

Massive CPU usage on exec() windows #108

Closed
Bartvds opened this issue Feb 23, 2014 · 1 comment
Closed

Massive CPU usage on exec() windows #108

Bartvds opened this issue Feb 23, 2014 · 1 comment

Comments

@Bartvds
Copy link

Bartvds commented Feb 23, 2014

A project I work on used ShellJS to run a node.js based JS compiler, but it was slow and had massive CPU usage on Windows.

While researching it found this comment: https://github.com/arturadib/shelljs/blob/master/src/exec.js#L66-L68

We swapped ShellJS for a child_process.spawn() and so far it looks like we gained ~20% overall speed with a lot less CPU use.

No idea what is going on in that sync-hack but it is not a good solution, at least not on Windows.

@Schoonology
Copy link
Contributor

This is to be expected for the synchronous exec method until Node 0.12 is available. At that point, synchronous exec calls will be far more performant.

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