Skip to content
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

Add video file extensions to the default skip list #431

Merged
merged 2 commits into from
Nov 2, 2022
Merged

Add video file extensions to the default skip list #431

merged 2 commits into from
Nov 2, 2022

Conversation

jribbens
Copy link
Contributor

Whitenoise attempts to compress video files, which is a huge waste of time and disk space (given video files tend to be large and slow to compress, especially with brotli), as of course neither gzip nor brotli will manage to do any meaningful compression on an already-compressed video file. Also I think browsers will tend to do byte-range requests on video files, which of course cannot use the compressed versions. So I think the common video-file extensions should be added to the default WHITENOISE_SKIP_COMPRESS_EXTENSIONS.

Copy link
Collaborator

@adamchainz adamchainz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 Thank you for the PR

src/whitenoise/compress.py Outdated Show resolved Hide resolved
@adamchainz adamchainz merged commit 612ab31 into evansd:main Nov 2, 2022
adamchainz added a commit that referenced this pull request Nov 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants