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

Extremely slow yarn run xxxx commands on large monorepo #2319

Closed
etiennedupont opened this issue Feb 19, 2020 · 1 comment
Closed

Extremely slow yarn run xxxx commands on large monorepo #2319

etiennedupont opened this issue Feb 19, 2020 · 1 comment

Comments

@etiennedupont
Copy link

Bug description

When running scripts defined in package.json using yarn run xxx on a large monorepo, there is an extremely long delay before the command is actually run. This delay is always the same and seems to depend on the size of the monorepo.

Command

Here is a simple example:

In package.json

{
  "scripts": {
    "echo": "echo ok"
  }
}

Then in shell run:

> yarn echo

.... WAITS FOR 265s .....

ok

Using time to confirm the duration:

> time yarn echo
ok
yarn echo  264.68s user 1.33s system 99% cpu 4:26.01 total

What is the current behavior?

Yarn does something using 100% of a CPU core for 265s (on my repo and machine) before actually running the command.

What is the expected behavior?

Yarn runs the command instantly

Steps to Reproduce

  1. Have a large monorepo with 176packages in the workspace.
  2. yarn install
  3. Run any yarn run xxxx command in any of the packages folder.

Environment

  • Node Version: 10.15.3
  • Yarn v1 Version: 2.0.0-rc.29.git.20200218.926781b7
  • OS and version: MacOS Catalina
@merceyz merceyz transferred this issue from yarnpkg/yarn Jan 2, 2021
@merceyz
Copy link
Member

merceyz commented Jan 2, 2021

Closing as this was fixed in #998

@merceyz merceyz closed this as completed Jan 2, 2021
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