-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
CircleCI: improve caching for faster startup time #3612
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
Conversation
@@ -14,10 +14,6 @@ jobs: | |||
working_directory: ~/plotly.js | |||
steps: | |||
- checkout | |||
- restore_cache: | |||
keys: | |||
- v{{ .Environment.CIRCLE_CACHE_VERSION }}-deps-{{ .Branch }}-{{ checksum "package-lock.json" }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notice here we use the checksum of "package-lock.json" but when we save the cache, we use the checksum of "package.json". Those two cache names will never match so this is why I removed this "dead" code.
Nice find. Great work! I'm curious though: can you try replacing our |
|
🎉 ! |
Now using |
💃 💃 |
cc @Marc-Andre-Rivet re: |
This PR slightly improves the execution time of our CircleCi :
I removed the steps to store and restore the cache because they were ineffective (the cache key would never match). We can reintroduce them later if we really want to save off a few seconds out of running
npm i
.Instead of doing a long git checkout process for every jobs, we pass the content of the

plotly.js
directory to subsequent jobs afterbuild
. This add rougly 5 seconds to thepersist_to_workspace
step. However, we reduce the startup time of all the following jobs by ~ 18 seconds:This will make running tests in parallel more efficient and save us N * 18 seconds of computation time each run.