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

high cpu usage during synchronous exec #167

Closed
MetaMemoryT opened this issue Nov 13, 2014 · 7 comments
Closed

high cpu usage during synchronous exec #167

MetaMemoryT opened this issue Nov 13, 2014 · 7 comments
Labels
exec Issues specific to the shell.exec() API low priority perf Windows

Comments

@MetaMemoryT
Copy link

Still getting 45% cpu usage when running synchronous exec on windows 8.1

@ariporad
Copy link
Contributor

@MetaMemoryT: Yeah, that's a side effect of our trying to make exec synchronous (Node doesn't support that by default). I don't really think there's anything we can do about it.

@nfischer: Thoughts?

@nfischer
Copy link
Member

I think some steps have been taken to reduce cpu usage for newer versions of node. @MetaMemoryT does the issue persist with node v5?

@sedwards2009
Copy link

Is using sleep() from https://www.npmjs.com/package/sleep an option? I appears to use a system call to sleep/stop the process for a given amount of time and it shouldn't burn CPU.

@nfischer nfischer added the exec Issues specific to the shell.exec() API label Feb 20, 2016
@boutell
Copy link

boutell commented Feb 13, 2017

Isn't this a dead issue thanks to execSync being used in versions of Node that support it (0.12 and better)? Or am I missing something?

@nfischer
Copy link
Member

@boutell thanks for pinging this issue. Yes, since we already dropped v0.10 support, I believe this can be safely closed.

@SuhairZain
Copy link

@nfischer Is this note in the README still relevant? Also, is this issue present only on Windows or on Unix platforms as well?

Note: For long-lived processes, it's best to run exec() asynchronously as the current synchronous implementation uses a lot of CPU. This should be getting fixed soon.

@nfischer
Copy link
Member

@SuhairZain nope 😄 And #825 removes that line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exec Issues specific to the shell.exec() API low priority perf Windows
Projects
None yet
Development

No branches or pull requests

6 participants