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

Attempt at reproduction of yarn performance issue since 1.9.2 #6584

Open
such opened this issue Oct 25, 2018 · 8 comments
Open

Attempt at reproduction of yarn performance issue since 1.9.2 #6584

such opened this issue Oct 25, 2018 · 8 comments
Assignees
Labels

Comments

@such
Copy link

such commented Oct 25, 2018

#6177 has just been closed and this is an attempt to reproduce the performance issues I've been experiencing when using yarn with Docker and a bind-mounted volume.

I created a simple repository that can be cloned: https://github.com/such/yarn-test.
This is simply the result of create-react-app plus some docker files.

The yarn version can be changed in the Dockerfile. I have been comparing 1.7.0 and 1.10.1.
An entrypoint script runs yarn install.

To reproduce:

$ docker build . -t yarn-test:latest
$ docker run --rm -it -v `pwd`:/app:delegated yarn-test:latest sh # using a delegated volume helps speeding up everything with both yarn versions
# once the initial install is done, directly in the docker container:
/app yarn add react-moment # or anything, really

According to my benchmark:

  • With 1.7.0:
    Initial install: 183s
    New dependency: 130s
  • With 1.10.1:
    Initial install: 154s
    New dependency: 27s

Note:
The performance issue does seem to exist without a bind-mounted volume. This can be tested by adding ADD . /app in the Dockerfile and removing the volume from the docker run command.

@ghost ghost assigned kaylie-alexa Oct 25, 2018
@ghost ghost added the triaged label Oct 25, 2018
@arcanis
Copy link
Member

arcanis commented Oct 26, 2018

Just to be sure - the problems only appear when using Docker, is that correct?

@arcanis
Copy link
Member

arcanis commented Oct 26, 2018

Also, I'm not sure I understand your benchmark results. From what I see it looks good, right? 183s vs 154s and 130s vs 27s in 1.10.

@such
Copy link
Author

such commented Oct 27, 2018

Sorry I mixed up the versions. It should have been:

  • With 1.7.0:
    Initial install: 154s
    New dependency: 27s
  • With 1.10.1:
    Initial install: 183s
    New dependency: 130s

I'd be happy if someone else could confirm it though!
Also I've only been experiencing problems with Docker indeed.

@adamgoose
Copy link

We have also experience this issue while running yarn in the node:11.3 image in GitLab CI.

@oreporan
Copy link

I'm experiencing the same issue using the node-9:alpine image both locally and in the CI
It seems there are 4 minutes of silence between the line:

Done in xxx seconds

until the next line.
Anyone have any leads? yarn version? docker version?

@ramarivera
Copy link

Any update on this? I am experiencing pretty much what @oreporan describes with node:lts

@eric-burel
Copy link

I seem to still have the same issue in Yarn 1.22, it hangs a long time after installing and building packages.

@amirqasemi74
Copy link

We have also same problem in node;14.19.0 docker image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants