CircleCI: improve caching for faster startup time#3612
Conversation
| - checkout | ||
| - restore_cache: | ||
| keys: | ||
| - v{{ .Environment.CIRCLE_CACHE_VERSION }}-deps-{{ .Branch }}-{{ checksum "package-lock.json" }} |
There was a problem hiding this comment.
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.jsdirectory to subsequent jobs afterbuild. This add rougly 5 seconds to thepersist_to_workspacestep. 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.