ci: compare yarn vs pnpm (benchmark...)#2799
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Code Climate has analyzed commit 2f8051b and detected 0 issues on this pull request. View more on Code Climate. |
👇 Click on the image for a new way to code review
Legend |
# Conflicts: # yarn.mixed-compress.lock
# Conflicts: # yarn.mixed-compress.lock
# Conflicts: # yarn.mixed-compress.lock

What does yarn compressionLevel brings on CI ?
compressionLevel=0saves ♻️ ~53 minutes of CI/month fromcompressionLevel=mixed(>25% speedup).workspace:^yet.Notes:
workspace:^dependencies.Notes
About install
On github install times will slightly varies between runs. But here's an output:
About action/cache
When running an install decompression happens all the time. The post restore cache action only happens when the lock file change.
Decompress action/cache
With
compressionLevel:0the zips becomes compressible by zstd leading to better compression ratios. WhencompressionLevel:1action/cache will detect the media as uncompressible. The reference pnpm seemss worse here as the cache is bigger, but it's not deduped the same way (see #2799 (comment))Compress action/cache
Counter-intuitively no significant difference between compressionLevel in term of time. Of course with compressionLevel: 0 the action cache will save space (and network io)
By comparison with PNPM the restore is slower (deduplication is different, see #2799 (comment)) and has more files (symlinks) to deal with.
About Yarn compressionLevel
On multi-core high end cpu, no significant difference. If you want to replicate ci behavior locally, use this hyperfine/taskset command:
YARN_COMPRESSION_LEVEL=0 taskset -c 0 yarn install --immutable --mode=skip-buildYARN_COMPRESSION_LEVEL=mixed taskset -c 0 yarn install --immutable --mode=skip-buildHyperfine/Taskset cmd