Express

Compressing small responses adds CPU overhead without benefit

info
performanceUpdated Feb 8, 2026(via Exa)
Technologies:
How to detect:

Applying compression middleware to small JSON payloads (under 1KB) adds CPU overhead that exceeds any bandwidth savings from compression.

Recommended action:

Configure compression middleware with threshold: 1024 to only compress responses larger than 1KB. Implement filter function to skip compression for specific requests.