Karsten Schmidt<p>Even though <a href="https://mastodon.thi.ng/tags/ThingUmbrella" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ThingUmbrella</span></a> isn't using a low-level language, many of its design aspects and decisions are explicitly about keeping resource usage low and being generally aware of code bundling, tree shaking (dead code elimination), CPU, energy & bandwidth consumptions... As the collection now consists of 186 libraries (with ~3850 source files!), every even minor saving in the shared build infrastructure will quickly have a positive compounding impact. Over the past month I've been busy updating & testing new tooling for the entire monorepo and am super happy to report _drastically_ reduced build & test times! "Drastically" here meaning a factor of 10-20x(!!!) faster... 🚀</p><p>Time to build & test the entire monorepo on GitHub's CI:</p><p>Previously, using only TypeScript for building & NodeJS for testing:<br>30-40 mins (😱)</p><p>Now, using <a href="https://esbuild.github.io" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">esbuild.github.io</span><span class="invisible"></span></a> for building and <a href="https://bun.sh" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">bun.sh</span><span class="invisible"></span></a> for testing:<br>1:50-2 mins (🤯)</p><p>On my MBA M1 (2021) the whole process only takes now 56 seconds!</p><p>If you want to apply the same kind of optimizations for your own project, do take a look at my package.json and tsconfig.json files in this repo:</p><p><a href="https://github.com/thi-ng/umbrella" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">github.com/thi-ng/umbrella</span><span class="invisible"></span></a></p><p>Ps. It's also <a href="https://mastodon.thi.ng/tags/ReleaseMonday" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ReleaseMonday</span></a>. Details about that in a later post... 🫡</p><p><a href="https://mastodon.thi.ng/tags/ThingUmbrella" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ThingUmbrella</span></a> <a href="https://mastodon.thi.ng/tags/Optimization" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Optimization</span></a> <a href="https://mastodon.thi.ng/tags/CI" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>CI</span></a> <a href="https://mastodon.thi.ng/tags/BuildTools" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>BuildTools</span></a> <a href="https://mastodon.thi.ng/tags/EnergyConsumption" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>EnergyConsumption</span></a> <a href="https://mastodon.thi.ng/tags/TypeScript" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TypeScript</span></a> <a href="https://mastodon.thi.ng/tags/esbuild" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>esbuild</span></a> <a href="https://mastodon.thi.ng/tags/Bun" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Bun</span></a> <a href="https://mastodon.thi.ng/tags/Monorepo" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Monorepo</span></a> <a href="https://mastodon.thi.ng/tags/OpenSource" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>OpenSource</span></a> <a href="https://mastodon.thi.ng/tags/GitHub" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>GitHub</span></a></p>