100% CPU usage in windows with node
- Please tell us about your environment:
- Angular version: 2.0.0-rc.4
- Browser: [ Chrome ] -OS : Windows
Problem:
I am using this project as baseline to setup a new project. After starting the node using webpack dev server , CPU usage in my windows machine is going to 100%. I have 16GB RAM. Has anyone faced this issue and know the solution?
I've noticed the same thing. I didn't dig deeper, but the CPU usage did drop immediately as soon as a shut down node and Chrome.
Were you using HMR by any chance? I was...
@Martaver - Nope I am not using the HMR. I am using npm run server:dev which is actually "webpack-dev-server --config config/webpack.dev.js --inline --progress --profile --colors --watch --display-error-details --display-cached --content-base src/" . I am sure this is because of web pack dev server running on node but not sure what is the solution for this.
I found out that it was happening because of webpack dev server watchOptions. If you increase the poll time then CPU usage goes down.
For anyone who finds themselves here in 2019, https://github.com/JeffreyWay/laravel-mix/issues/1418. This worked for me although I'm not using Angular.