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

CPU占用太高 #25

Closed
nitrohe opened this issue Mar 3, 2018 · 4 comments
Closed

CPU占用太高 #25

nitrohe opened this issue Mar 3, 2018 · 4 comments

Comments

@nitrohe
Copy link

nitrohe commented Mar 3, 2018

博主,npm start之后,cpu就达到100%(win7 64、10G内存),把除了浏览器和两个启动的cmd窗口之外的应用都关了

@nitrohe
Copy link
Author

nitrohe commented Mar 3, 2018

看了一下进程,node.exe的cpu占用80%到90%

@zgw010
Copy link

zgw010 commented Apr 12, 2018

用的什么编辑器

@nitrohe
Copy link
Author

nitrohe commented Apr 12, 2018

@Hasaki1997 atom代码编辑器;
@Nealyang 博主,排查了一下代码,定位代码部分为 app.use(WebpackDevMiddleware(compiler, {
publicPath: '/',
stats: {colors: true},
lazy: false,
watchOptions: {
aggregateTimeout: 300,
poll: true
},
}));
暂时修改为
app.use(WebpackDevMiddleware(compiler, {
publicPath: '/',
stats: {colors: true}
}));
cpu占用恢复正常;

@nitrohe nitrohe closed this as completed Apr 12, 2018
@Nealyang
Copy link
Owner

一直在忙工作,这个问题也是不少人反应,一直没有review代码。多谢!

@Nealyang Nealyang mentioned this issue Apr 13, 2018
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

3 participants