-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Bug] Bad performance #2560
Comments
In a real project, my (very small) unit test suite takes 0.12s when started directly from phpunit, 3.19s when started via yarn. What is happening there? |
It doesn't - the time you should read is
It's a good thing you mentioned that in particular - I noticed that in one of our functions, we repeatedly require the same file, one extra time for each dependency that exposes bin entries. The more you have, the slower the env preparation (step 3 I mentioned) becomes (hence why you noticed considerably slower startup than in an empty project). I'll look to improve that. |
@arcanis Thanks for pointing out the difference between the values returned by I appreciate the details about what actually happens when we |
You can try it right now by running
|
Execution time reduced by 50% when running my unit test suite! |
Describe the bug
Even with no dependencies and no files in my directory, a very simple command defined in
scripts
takes almost a second to execute. Not sure if this counts as a bug, but one of the sellings points of yarn used to be that it was fast…I can understand Yarn needs more time to boot than before, but this seems like a lot, especially when using it to run simple external commands or even a simple
yarn -v
.To Reproduce
In an empty directory:
package.json
with the following:yarn set version berry
yarn install
time yarn test
gives:time cal
gives:Environment:
The text was updated successfully, but these errors were encountered: