Unclear why brotli is disabled by default
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 5.6k
- Forks
- 176
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I see that the [documentation](https://github.com/lukeed/polka/tree/02cbdb529ddca0a9f3d225e2abb2931924219cc3/packages/compression#optionsbrotli) states:
> Brotli incurs more performance overhead than Gzip, which is why it's not enabled by default.
But looking at most files on https://quixdb.github.io/squash-benchmark/ (e.g. `plrabn12.txt` on `s-desktop`), that doesn’t seem to be the case at what polka states to be their default settings (6 for both, although [Brotli’s documentation](https://www.brotli.org/encode.html#a8d0) says the default is 11). Alternatively, https://github.com/powturbo/TurboBench finds that on their corpus, `brotli -q 4` compresses faster than `gzip -6` and still denser than `gzip -9`. Is it perhaps the case that Brotli was disabled in polka based on its speed at `-q 11` being mistaken for its speed at `-q 6`?
(Disclaimer: I happen to work at Google on the team that originated Brotli before I joined, but I am writing this in my personal capacity. Working with them just happens to have sensitised me to the popular misconception that Brotli is inherently slow.)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the documentation at packages/compression#optionsbrotli and compare its stated defaults and performance rationale with the benchmark links in the issue. Verify whether the explanation accurately reflects Polka’s behavior, then clarify the documentation; done when the reason Brotli is disabled by default is unambiguous.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100