-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
fix: 23 #24
fix: 23 #24
Conversation
This would do the trick, but it is the same fix as I did in Vitest. Would be nice if we don't create threads if there is no work for them in the queue. |
@Demivan Well, as you can see in the code, we create new workers based on maxThreads (L853), So I guess it's good! What's your opinion now? |
But one thing, we can also make |
So it'd always see the actual capacity instead of 1.5 or 0.5 of it! |
Ah, I see it now. Then we can reuse new code for L853 too. Later it can be improved to add workers only if there is work to do. |
Thanks, @Demivan My system is only 4 cores, it's poor enough, could you try and see if it gains you the performance you need? |
Yes, there is a performance boost. It now uses 8 of my cores - that is correct for physical cores config. We still need to pass config to Tinypool in Vitest because we want different config for watch and run. But we no longer need |
Ok then, feel free if this PR improves vitest! Let me merge it! Thank you for your excellent work! |
Fixes #23