Skip to content

Make fast compression the default#24

Closed
alvinwan wants to merge 1 commit intomainfrom
dev/alvin/fast-default-slow-profile
Closed

Make fast compression the default#24
alvinwan wants to merge 1 commit intomainfrom
dev/alvin/fast-default-slow-profile

Conversation

@alvinwan
Copy link
Copy Markdown
Owner

@alvinwan alvinwan commented Apr 9, 2026

Summary

Make the faster compression profile the default for both the Python API and CLI, while keeping the slower full pipeline available as an explicit opt-in.

What Changed

  • changed minify() to default to fast=True
  • changed the CLI to default to the fast profile and added --slow for the full pipeline
  • kept the reserved-name cache improvement in place for the shared path
  • updated tests to pin fast=False only where they specifically validate the slower hoisting and aliasing passes
  • refreshed the checked-in example output and benchmark harness/docs to reflect the new profile split

Why

The previous default paid a meaningful runtime cost for two optional passes that are not consistently beneficial. On the checked-in fixtures, the fast path is materially quicker, and the slower path is not reliably smaller on larger packages.

Impact

  • default pymini runs are faster without any flags
  • users who want the old full pipeline can still get it with --slow or fast=False
  • benchmark docs now distinguish default-speed behavior from the slower opt-in pipeline

Validation

  • .venv/bin/pytest
  • refreshed local benchmark measurements used in benchmarks/README.md

Notes

The slower profile still helps some smaller or targeted inputs, but it can also produce slightly larger output on fixtures like click and pytest, so the PR avoids presenting it as a universal "best compression" mode.

@alvinwan alvinwan changed the title [codex] Make fast compression the default Make fast compression the default Apr 9, 2026
@alvinwan alvinwan closed this Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant