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 on node 15.5 / apple silicon ARM #208

Open
samopus1io opened this issue Jan 21, 2021 · 2 comments
Open

High CPU on node 15.5 / apple silicon ARM #208

samopus1io opened this issue Jan 21, 2021 · 2 comments

Comments

@samopus1io
Copy link

samopus1io commented Jan 21, 2021

  • 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

@shellscape
Copy link
Owner

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

@samopus1io
Copy link
Author

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

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

2 participants