Open RaphaelMarinier opened 3 months ago
📝 Docs preview for commit 1ba728844a4ef09619a629453feb753d79032b8a at: https://12056547.fastapitiangolo.pages.dev
Seems like it's duplicated PR #11350
Indeed, it's mostly a duplicate (I was not aware of it), except that the default I propose in the doc is probably a better tradeoff (typically 3x less CPU usage, for only one percent point larger outputs).
compresslevel
is defined there in starlette's GZipMiddleware: https://github.com/encode/starlette/blob/4e453ce91940cc7c995e6c728e3fdf341c039056/starlette/middleware/gzip.py#L30compresslevel=5 is typically a better CPU / compression level tradeoff than 9, e.g. see: https://tukaani.org/lzma/benchmarks.html