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

background option cause the node consume too much CPU #25

Closed
ghost opened this issue Nov 25, 2013 · 2 comments
Closed

background option cause the node consume too much CPU #25

ghost opened this issue Nov 25, 2013 · 2 comments

Comments

@ghost
Copy link

ghost commented Nov 25, 2013

If I set the background:true, the node will consume almost 35%~46% of my CPU.

my config:

express: {
    options: {
    port: 8080,
            debug: true,
            background: true,
            delay: 2000
        },
        dev: {
            options: {
                script: "app.js"
            }
        }
},
@ericclemmons
Copy link
Owner

That's interesting. By default, background is true, so that the server runs in it's own process.

I'm running the following now from master:

$ grunt express:defaults watch

screen shot 2013-12-01 at 3 28 59 pm

The first one is the Grunt + watch, while the 2nd one is the server itself.

Is it the complexity of your application, or is it because the watch task is watching tons of files? You can test this by setting background: false on your app (which is the equivalent of just running node ./path/to/server.js) and take a screenshot of the difference.

@ericclemmons
Copy link
Owner

Closing until someone can help me replicate the issue...

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

1 participant