feat(cli): Add post-processing steps to optimize the bundle size#91
feat(cli): Add post-processing steps to optimize the bundle size#91ryanking13 wants to merge 3 commits intomainfrom
Conversation
|
A very simple worker that uses before after |
There was a problem hiding this comment.
I'm Bonk, and I've done a quick review of your PR.
This PR adds a post-processing optimization step using wheel-optimizer to reduce python_modules bundle size, with sensible defaults and user-configurable overrides via pyproject.toml.
Issues
-
Unpinned
wheel-optimizerdependency (medium): Every other dependency inpyproject.tomlhas version constraints (e.g.,click>=8.0.0,<9.0.0). Leavingwheel-optimizerunpinned risks breakage if a future release changes theOptimizerConfig/OptimizerPipelineAPI. -
Integration test assumes
py_filesis non-empty (low):py_files[0]will raiseIndexErrorif no.pyfiles exceed 100 bytes, producing a confusing traceback instead of a clear test failure.
|
Review posted successfully on PR #91 with two inline suggestion comments:
|
This adds a post-processing step after installing python packages that reduces the size of the
python_modulesdirectory by applying several optimizers.By default, following optimizers are on:
while users can addtionally turn on other optimizers if they face size limit issues.
These optimizers can be configured by the pyproject.toml file: