这是indexloc提供的服务,不要输入任何密码
Skip to content

fix: Move runOptions stream checks before the for loop to prevent cpu load #529

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

Merged
merged 4 commits into from
Jan 10, 2022

Conversation

marcinbunsch
Copy link
Contributor

@marcinbunsch marcinbunsch commented Jan 9, 2022

runOptions.stream is now true by default, so Listen now performs
a lot of empty runs, causing cpu load (one core having 100% load all the time).

This fix prevents the overload by never running the loop if stream is set
to true, as all cases in the loop relied on it being false.

I left a bunch of debugging notes here: #205 (comment)

Should solve these two issues:

Fix #205
Fix #521

`runOptions.stream` is now `true` by default, so `Listen` now performs
a lot of empty runs, causing cpu load (one core having 100% load all the time).

This fix prevents the overload by never running the loop if `stream` is set
to `true`, as all cases in the loop relied on it being false.
@vercel
Copy link

vercel bot commented Jan 9, 2022

@marcinbunsch is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

jaredpalmer
jaredpalmer previously approved these changes Jan 10, 2022
@vercel
Copy link

vercel bot commented Jan 10, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/vercel/turbo-site/2J7avyGTXDt2j7FHmxoChxg3rLeR
✅ Preview: https://turbo-site-git-fork-marcinbunsch-main.vercel.sh

@jaredpalmer jaredpalmer changed the title Move runOptions stream checks before the for loop to prevent cpu load fix: Move runOptions stream checks before the for loop to prevent cpu load Jan 10, 2022
@jaredpalmer jaredpalmer merged commit 068c40b into vercel:main Jan 10, 2022
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

Successfully merging this pull request may close these issues.

turborepo --parallel consumes 100% CPU on one thread starter cpu full load
2 participants