Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[code-infra] Disable pnpm package cache on CircleCI #40670

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

michaldudak
Copy link
Member

@michaldudak michaldudak commented Jan 18, 2024

Investigating what effect disabling package cache has on build times.

It seems that in cases where cache would be hit, the restore + install step takes roughly the same time as installing fresh packages from the registry.
In the cache miss scenario, however, saving the downloaded packages to the cache store take a lot of time (over a minute), so we can optimize this scenario.

Cache hit: restore + install: 27s + 2s = 29s
Cache miss: install + store = 34s + 68s = 102s
Fresh install: 31s

In addition, dropping the cache would save us storage costs (for example, in November 2023 we used 547 GB-months of storage, which was 14% of our total CircleCI credits usage).

@mui-bot
Copy link

mui-bot commented Jan 18, 2024

Netlify deploy preview

https://deploy-preview-40670--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 4e4f0ef

@michaldudak michaldudak added the scope: code-infra Specific to the core-infra product label Jan 18, 2024
@michaldudak michaldudak requested a review from a team January 18, 2024 10:12
@michaldudak michaldudak marked this pull request as ready for review January 18, 2024 10:12
Copy link
Member

@Janpot Janpot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great call

@michaldudak michaldudak merged commit bd2bd9a into mui:master Jan 18, 2024
@michaldudak michaldudak deleted the disable-pnpm-cache branch January 18, 2024 10:21
@oliviertassinari
Copy link
Member

oliviertassinari commented Mar 2, 2024

Based on https://docs.google.com/spreadsheets/d/1VQFM0bcX1oFrvt6tKjdqQDi5KJac_-HZcNavfvFk2tQ/edit#gid=0, we saved about 210 GB/month of cache storage use, at $0.252/GB, we saved $649/year with this PR. Doing the same in X might be interesting as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: code-infra Specific to the core-infra product test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants