« »
1/30/2017

How we reduced by 37% our NodeJS project build time with one line

For Image-Charts, Redsmin and the-to-be-announced-next-SaaS I use Jenkins as the continuous integration system. Lately I discovered that 75% of Image-Charts project build time was related to the dependencies installation part.
I don't like and do not advise to enable caching at the build level because it inherently breaks the principle of repeatable and independent builds thus for every project I work on each build starts with a clean empty cache.

So I wondered how long Image-Charts build would take if we were to replace npm with yarn for the dependencies installation part.



For a medium-sized project like Image-Charts (39 dependencies and 9 dev-dependencies and some native dependencies) switching the installation step to yarn reduced the build time by up to 37% which is really awesome! The next pain point to improve would be a switch from mocha to ava in order to leverage parallel tests execution but that's another story!

« »
 
 
Made with on a hot august night from an airplane the 19th of March 2017.