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

use brotli to compress self profile response #1968

Merged
merged 1 commit into from
Aug 24, 2024

Conversation

s7tya
Copy link
Contributor

alternative to #1966
This PR is using brotli to compress and consider Accept-Encoding header according to previous PR's discussion.

Copy link
Contributor Author

It will take about 22s to load both directory giving gzip into the perfetto, and using brotli & content-encoding: brotli by my eyes & stopwatch.
However, it would be nice to use brotli than gzip if it's available, so I propose this than the previous one.

Copy link
Contributor Author

(Current production RLO takes about 200s to load. so this makes x10 faster. )

@Kobzol
Copy link
Contributor

Kobzol commented Aug 23, 2024

Because we don't have #1896 yet, it is not easy to fully test (and benchmark) this locally. So I guess we can try it on the live server and see how fast it is in practice.

@Kobzol
Copy link
Contributor

Kobzol commented Aug 23, 2024

Looks good! :) Was 5 the best trade-off for the compression options that you found? :)

force-pushed the brotli-profile branch from 3a72319 to 06fe065 Compare August 23, 2024 13:39
Copy link
Contributor Author

I just took benchmark and changed to 4.

207.22 MB → 19.55 MB (size: 9.43%, quality: 2, time: 713.505083ms)
207.22 MB → 13.85 MB (size: 6.69%, quality: 3, time: 744.224166ms)
207.22 MB → 11.42 MB (size: 5.51%, quality: 4, time: 738.653667ms)
207.22 MB → 12.88 MB (size: 6.22%, quality: 5, time: 1.467692333s)

force-pushed the brotli-profile branch from 06fe065 to 2ab84d3 Compare August 23, 2024 13:47
Copy link
Contributor

@Kobzol Kobzol left a comment

Choose a reason for hiding this comment

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

Thanks for doing the benchmark! The comment in server.rs said that 4 might be too slow, maybe on the production server it will be a bit worse, but I'm fine with starting with 4, it looks like it has a good trade-off locally! It is surprising that 5 produces a larger output than 4 though.

Thanks for working on this ❤️

@Kobzol Kobzol merged commit 32a6ce2 into rust-lang:master Aug 24, 2024
11 checks passed
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