Skip to content

Commit 96396ce

Browse files
committed
perf: add dynamically loaded cache-dependencies for actions python
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`](https://github.com/aminya/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](https://github.com/actions/setup-python/assets/16418197/ec1baf34-85c3-459d-b8cf-894899959b2c)
1 parent ffff3ab commit 96396ce

27 files changed

+65
-62
lines changed

dist/actions/actions_python.3d3da518.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

dist/actions/actions_python.3d3da518.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

dist/actions/actions_python.e89dee1a.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/actions/actions_python.e89dee1a.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/actions/cache-dependencies.a31532a6.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/actions/cache-dependencies.a31532a6.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/actions/setup-cpp.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/actions/setup-cpp.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/legacy/actions_python.3180bacb.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/legacy/actions_python.3180bacb.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)