Skip to content

Add video file extensions to the default skip list#431

Merged
adamchainz merged 2 commits into
evansd:mainfrom
jribbens:jribbens-skip-video
Nov 2, 2022
Merged

Add video file extensions to the default skip list#431
adamchainz merged 2 commits into
evansd:mainfrom
jribbens:jribbens-skip-video

Conversation

@jribbens

Copy link
Copy Markdown
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.

@adamchainz adamchainz left a comment

Copy link
Copy Markdown
Collaborator

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

Comment thread src/whitenoise/compress.py Outdated
@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.

2 participants