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

Ci: improve install time iteration 2 #16638

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
nodeLinker: node-modules

enableGlobalCache: false
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some might wonder, why it's suddently needed. Cause afterall it's overridden in the install action.

Context:

PS: enableGlobalCache might be default in upcoming yarn version, so we align for the future as well)


nmMode: hardlinks-local
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This one is not totally required. We'll see the ultimate choice made by upcoming yarn 4. But I'd say... keep it there explicitly (in yarn 3 it's the default).

I'm open to remove this too (anyway the install action explcitly overrides it to 'hardlinks-local')


plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: '@yarnpkg/plugin-interactive-tools'

defaultSemverRangePrefix: ''

compressionLevel: 0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the zip isn't compressed. More work for action/cache restore / network / decompress (zstd detects when it can compress or not so... now the *.zip files will be compressable by action/cache -> slower but more compressed too)

For the curious:

My previous benchmarks +/- based on https://github.com/belgattitude/nextjs-monorepo-example

Speed

CI Scenario Install CI fetch cache CI persist cache Setup
yarn4 mixed-compression ±42s ±3s (±9s) 0s
yarn4 no compression ±34s ±4s (±6s) 0s
pnpm8 ±19s ±8s (±29s) 2s

Cache budget

CI Scenario Fetch cache Persist cache Size
yarn4 mixed-compression ±5s ±6s 220MB
yarn4 no compression ±8s ±9s 180MB
pnpm7 ±14s ±16s 273MB

More metrics in https://github.com/belgattitude/compare-package-managers


preferInteractive: true

yarnPath: .yarn/releases/yarn-3.5.0.cjs