TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

We saved 2 centuries of compute time by applying caching

8 点作者 juristr将近 3 年前
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 条评论

Schroedingersat将近 3 年前
Congratulations. You discovered makefiles or memoization.
pwg将近 3 年前
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 未加载