High CPU on node 15.5 / apple silicon ARM
- Webpack Version: 4.1.0
- Operating System (or Browser): macOS BigSur 11.1 (Apple Silicon / M1 / ARM)
- Node Version: 15.5.0
- webpack-plugin-serve Version: 1.2.1
Not sure if this is an issue with webpack-plugin-serve or an underlying dependency, but since switching from x86 Mac to M1 Apple Silicon Mac, webpack-plugin-serve takes high amount of CPU (+100%).
- System trace shows its constantly scanning all the files in the repo (instead of presumably using fsevents)
- Using HMR / http2 / waitForBuild / historyFallback options
- No CPU issue with webpack dev server on same computer / same repo / same web pack version
- Was able to partially work around the issue and reduce CPU usage (down to 20%) by adding watchOptions:
{ ignored: './node_modules/**', aggregateTimeout: 600, poll: 1000, };
Thanks
thanks for opening an issue. I hate to tell you this, but you're probably going to see a lot of the same kind of replies until the m1 is widely distributed - this one's going to be in your wheelhouse to debug unfortunately. I don't own a new laptop and don't know anybody else who does. so unfortunately this is going to be one of those issues that has to be solved by the community. I wish I could do more to help you, but I just have no way to debug it since it's specific to that platform
No worries I understand - I expected to be on the bleeding edge with the new M1 computer (works surprisingly well though :)
I thought I would open the issue and provide a temporary workaround to help anyone facing the same issue until its resolved.
Happy to help anyway I can to troubleshoot this if anyone points me in the right direction (not an expert in node and native plugins). In the meantime I can live with the watchOptions.
Thanks