https://github.com/pypa/pip/blob/master/.azure-pipelines/scr...
I'm very surprised. Is this common?
https://github.com/pypa/pip/blob/master/.azure-pipelines/scr...
I'm very surprised. Is this common?
Let's say you have 200 JS libraries that you need to install dependencies, build and test for each commit. Making the JS dependencies install into a common cache directory into /dev/shm will easily speed up the install phase (and make the projects share dependencies cache fairly easily), and you could also make the test data (like fixtures) go through /dev/shm if you need it to.
conn = sqlite3.connect(":memory:")
But also run against your prod-like database (Postgres/MySQL etc.) later in the CI pipe to catch idiosyncratic database problems.
https://dev.to/thejessleigh/speed-up-your-postgresql-unit-te...
In my environment unpacking a 200MB .tar.gz containing node_modules from previous runs takes half the time on RAM disk vs. SSD local storage. Python doesn't gain as much, packages tend to have fewer small files but there still is a small gain.
How much tests benefit from using a RAM disk depends heavily on what they do, I have seen 10% for React apps.
We also use other simple tricks like running databases with disabled fsync, mv instead of rm, cache whatever can be cached between CI runs, shallow checkouts and so on. Nothing ground breaking but it all adds up.
However, for pipelines which run for five minutes twice a day I don't even bother.
The drawbacks are that memory is kinda expensive in high amounts, and compilers love memory.