PatrickJS-starter icon indicating copy to clipboard operation
PatrickJS-starter copied to clipboard

100% CPU usage in windows with node

Open gaurav2887 opened this issue 10 years ago • 4 comments

  • 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?

gaurav2887 avatar Jul 08 '16 16:07 gaurav2887

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 avatar Jul 20 '16 07:07 martaver

@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.

gaurav2887 avatar Jul 20 '16 16:07 gaurav2887

I found out that it was happening because of webpack dev server watchOptions. If you increase the poll time then CPU usage goes down.

gaurav2887 avatar Sep 14 '16 21:09 gaurav2887

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.

terrancecorley avatar Aug 12 '19 22:08 terrancecorley