-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Slow compression with many files - add skip patterns settings #279
Comments
This is a good idea IMO... Rather than just setting a file pattern, a really flexible way to handle this in Whitenoise could be to have a setting that allows configuring the Compressor class in settings, and then you provide your own (where you override the should_compress() function). That would let you select based on filename pattern but also on other things like a lookup or file size etc. settings.py:
myapp/apps.py:
For WSGI apps, this could also work with an extra command line option to the whitenoise.compress CLI, that instantiates your custom class instead of the normal one:
|
I have many static files and the compression is very slow (~5 minutes). There are many files collected, that would be probably never used by website users.
If there was some settings similar to
WHITENOISE_SKIP_COMPRESS_EXTENSIONS
which would allow to add file patterns to skip compression, that would solve my problem.The text was updated successfully, but these errors were encountered: