-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Slow building environment
state
#50
Comments
Here's my .travis.yml and the results on Windows 10 Enterprise [Version 10.0.10240]: language: node_js
node_js:
- '7'
- '6'
- '4'
before_install:
- npm install -g npm
- npm install -g xo
script:
- xo PS C:\Users\gokaygurcan\Projects\trevor-test> Measure-Command {trevor}
Days : 0
Hours : 0
Minutes : 6
Seconds : 19
Milliseconds : 256
Ticks : 3792569434
TotalDays : 0,00438954795601852
TotalHours : 0,105349150944444
TotalMinutes : 6,32094905666667
TotalSeconds : 379,2569434
TotalMilliseconds : 379256,9434 As a sum, 6m 19s with 3 different versions. That makes ~2m for each like yours. My virtual machine's specs are 1 GB memory and 1 CPU core up to 100% cap btw. ~~ I'll try on macOS with same specs and update the comment tonight. ~~ Same .travis.yml on macOS (I'm not sure about the specs of the VM, it's the default one): gokaygurcan ~/Projects/trevor-test $ time trevor
✔ 4: success
✔ 6: success
✔ 7: success
real 1m24.424s
user 0m3.481s
sys 0m2.400s |
Very strange, because with 2 cores cpu was loaded about 75-80% |
|
So, can we use Can we keep environment (optional) between Because 17 min only for |
You could point npm cache to your host machine? This problem usually exists if there is no shared cache, in the case of docker the cache should be stored outside the container |
This isn't easily possible right now, because Trevor uses the official Node.js Docker image, which doesn't have yarn bundled in.
It should preserve the Docker image between runs. I barely see "building environment" step, because it's cached on future executions. |
@gabrielcsapo I assumed I would have to run a local npm registry to significantly enhance building environment's npm install lag time. Is there another way that I can get similar performance to something like verdaccio with npm cache by itself? From what I've read so far specifying npm cache alone only saves a fraction of what running a local npm registry does. I'm still figuring out my options; any pointers are appreciated |
@alechp having a local registry would be a good option, but so would sharing the state of the node_modules between the |
I'm also having this issue, but it may be caused by slow internet connection.
Then why not time it? It would be very useful to display how long does |
@vadimdemedes Can you try running |
How fast
docker
should runbuilding environment
state?For me on MacBook air 2015 (8gb ram) with one container (node 7.4.0) it takes 1:50 min, it looks very slow. Docker takes 2 gb ram and 2 core.
With 5 containers time about 17 min.
The text was updated successfully, but these errors were encountered: