Skip to content

Site: compress responses #1201

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

Merged
merged 3 commits into from
Mar 15, 2022
Merged

Conversation

miwig
Copy link
Contributor

@miwig miwig commented Mar 12, 2022

Closes #1187. I've chosen Brotli as the compression method, which is supported in all major browsers and should be better and faster than gzip.

For now, compression is applied to all POST request responses (including the compare page), and to the graph/graphs requests.

It should be a performance win, especially on slower connections, but it's hard to tell how much without #1194 running in prod. It would also be great to have a recent dump of the database for local testing.

@miwig miwig force-pushed the compress-responses branch from 3308896 to 012f1a9 Compare March 14, 2022 17:07
@miwig
Copy link
Contributor Author

miwig commented Mar 14, 2022

I've implemented your suggestions. Let me know if there's more :)

Copy link
Member

@Mark-Simulacrum Mark-Simulacrum left a comment

Choose a reason for hiding this comment

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

It might be worth migrating to plain JSON for all our responses, now that we're compressing them I imagine that might be not that much of a size/performance hit, particularly in browsers where JSON loading is pretty well optimized (compared to the JS library we're using).

@Mark-Simulacrum Mark-Simulacrum merged commit 6a7cea8 into rust-lang:master Mar 15, 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.

Enable gzip on responses
2 participants