Skip to content

Conversation

@mik-laj
Copy link
Member

@mik-laj mik-laj commented Jan 6, 2021

Brotli is a more modern compression algorithm that provides better compression ratios than gzip and is widely supported by browsers. If the browser does not support Brotli, another supported algorithm will be used - gzip, deflate.


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.

@boring-cyborg boring-cyborg bot added the area:webserver Webserver related Issues label Jan 6, 2021
@kaxil kaxil requested a review from ryanahamilton January 7, 2021 00:41


def gzipped(f: T) -> T:
def compressed(f: T) -> T:
Copy link
Member

Choose a reason for hiding this comment

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

Can't we just use the decorator from flask_comrpressed rather than having to implement our own? https://github.com/colour-science/flask-compress/blob/master/flask_compress.py#L206-L215

Copy link
Member Author

Choose a reason for hiding this comment

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

This decorator requires that we have a global variable with a Compress instance. I preferred to avoid it, so I implemented this decorator again. See: colour-science/flask-compress#12

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Feb 28, 2021
@github-actions github-actions bot closed this Mar 5, 2021
@tirkarthi
Copy link
Contributor

This will be a very useful feature. We deployed the change internally with flask-compress before noticing this PR and had significant speedups and in some cases up to 10x reduction in bandwidth transfer for large grid pages and homepage with lot of dag runs and tasks. This can be done in load balancer end but unfortunately we don't have control over nginx. This will also be helpful in local environments and some non production environments that don't have load balancer setup. It will be helpful to have this as part of upstream itself.

We did notice an issue where static files are not compressed and ended up using 1.11 and yet to test 1.13. Related issue : colour-science/flask-compress#37

@potiuk
Copy link
Member

potiuk commented Oct 24, 2022

Feel free to pick it up @tirkarthi and contribute it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:webserver Webserver related Issues stale Stale PRs per the .github/workflows/stale.yml policy file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants