setup-python icon indicating copy to clipboard operation
setup-python copied to clipboard

perf: add dynamically loaded cache-dependencies module

Open aminya opened this issue 2 years ago • 1 comments

Description: This reduces the main bundle size by ⚠️ 1.28 MB minified! This bundle is loaded only when caching is enabled.

setup-python is used in setup-cpp as a library. This optimization reduces the bundle size for that package as well. The build system of setup-python uses ncc, which doesn't immediately benefit from this change, but setup-cpp uses Parcel, which shows this huge improvement.

The reason for this huge reduction is that caching the dependencies uses the @actions/cache package, which is an extremely large package with big dependencies. The bundle size before this separation shows this: Screenshot_20230907_230625

Related issue:

Check list:

  • [ ] Mark if documentation changes are required.
  • [ ] Mark if tests were added or updated to cover the changes.

aminya avatar Sep 08 '23 06:09 aminya

@konradpabjan could you review this?

aminya avatar Sep 20 '24 22:09 aminya