TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

We saved 2 centuries of compute time by applying caching

8 pointsby juristralmost 3 years ago
I&#x27;m a core team member of Nx (nx.dev) and one of the core features we implemented quite a while ago, is &quot;computation caching&quot;. Basically to speed up things, we get all the input to a given computation, which our case as a devtool means running your Jest tests, Webpack&#x2F;esbuild&#x2F;... build etc, and cache the result (logs &amp; potential build artifacts).<p>Next time when the same computation is run, we look it up and restore it from the cache, obviously tremendously improving the speed of the run. The real value is when you distribute that cache among co-workers, CI agents etc., which you can do with Nx Cloud (nx.app).<p>We had played with the idea of potentially mapping this to CO2 emissions. If you start saving a lot of computation, this reduces the number of times a machine gets spin up &amp; executed on your CI. Well, earlier this week we aggregated some stats of how much time we saved and we were pretty by the result ourselves!<p>I summed it up in this blog article: https:&#x2F;&#x2F;blog.nrwl.io&#x2F;helping-the-environment-by-saving-two-centuries-of-compute-time-feea8e1ce22?source=friends_link&amp;sk=9b1259d0b171a7b95ebe95b3795660b5<p>But basically we saved:<p>- last 7 days: ~5 years of compute time<p>- last 30 days: ~23 years<p>- since beginning of Nx Cloud: ~200 years

2 comments

Schroedingersatalmost 3 years ago
Congratulations. You discovered makefiles or memoization.
pwgalmost 3 years ago
See: <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Memoization" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Memoization</a>
评论 #32513527 未加载
评论 #32513852 未加载