jezdez/django_compressor — Issue #168: django_compressor noticeably slows down production site
Author: lsemel
Created: 2011-11-29 22:44:58+00:00
State: open

I have my site running on two identical servers. and enabled django_compressor on one of them, and left the other with django_compressor installed but with COMPRESS_ENABLED=False. On the server with compressor enabled, requests took an average of 700ms longer, sometimes much longer. I used ApacheBench to hit each server with a set of identical requests in sequence.

I also tried various settings for precompression, adding a call to the 'compress' management command to my deployment script.
- When I left COMPRESS_ENABLED=True but adding COMPRESS_OFFLINE=True, and that didn't make a difference.
- When I set COMPRESS_ENABLED=False and left COMPRESS_OFFLINE=True, I got an error 'Error: Compressor is disabled. Set COMPRESS settting..'

I'm using redis as my caching backend.

It doesn't look like there's a way to enable compression but guarantee that it only runs via the management command. Otherwise it doesn't look like I can use this on my production site.