Default python compression level (11) causes more delay than it's worth on larger files
- Dominant language
- TypeScript
- Stars
- 14.9k
- Forks
- 1.4k
- Avg merge
- 4d 20h
- Merged PRs (30d)
- 9
Description
Using a 7314288 byte (~7MB) json file as an example:

The image is kinda blown out, so here's the raw data:
Quality | Compression Time | Size
-- | -- | --
0 | 0.011061668 | 287292
1 | 0.009209156 | 213457
2 | 0.018366814 | 184692
3 | 0.01734972 | 184569
4 | 0.023967743 | 177295
5 | 0.037658453 | 151161
6 | 0.042690992 | 150042
7 | 0.054255962 | 148143
8 | 0.072593212 | 147667
9 | 0.108716726 | 146448
10 | 1.435314894 | 130876
11 | 20.70757484 | 122797
I understand the desire to have the library put its highest compression quality out there first, but wouldn't it create an overall better impression on users if a faster default was used? Quality 8 provides nearly as good a result as 11, but it's almost 300 times faster.
Contributor guide
Research direction
Start by locating the Python binding's default compression quality and the code or tests that define it. Compare the reported quality 8 and 11 timings and output sizes, then determine what benchmark or test should establish the new default; done means the default behavior and its documentation or tests consistently reflect the chosen quality.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100