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

Serve raw content compressed if suitable #33

Conversation

Kaliumhexacyanoferrat
Copy link

@Kaliumhexacyanoferrat Kaliumhexacyanoferrat commented Nov 26, 2024

See TechEmpower/FrameworkBenchmarks#9426

  • Compress only if the content can be compressed (so Content-Type is application/json in our case)
  • Refactor the logic into its own class (e.g. ResultCompressionHandler)
  • Add unit tests

@Kaliumhexacyanoferrat
Copy link
Author

Kaliumhexacyanoferrat commented Nov 26, 2024

@michaelhixson may I add a Brotli lib to the POM or are we fine with gzip?

And additionally: The official round result files are also not compressed - this source isn't a public repo, right?

@joanhey
Copy link

joanhey commented Nov 26, 2024

The files can be served and compressed from the same Nginx server.

image

As the files are static, when finish the run, we can use nginx static compression.
So after finish the run, we can generate the compressed files at maximum level. We will use less CPU to serve and be faster, but more space in the hard disk. This option is more friendly and ecological.

the shoemaker's children go barefoot

@Kaliumhexacyanoferrat
Copy link
Author

Kaliumhexacyanoferrat commented Nov 26, 2024

Yes, sounds better to serve the files using nginx instead of routing them through a Java web app. So this would be a new rule to serve the results on your web server with static gzip enabled, some CORS headers and an adjustment of the result generation script which would need produce the *.gz files with maximum compression level. I fear that both steps are out of my reach in terms of contributing to one of the public projects 🤔

Btw. I just saw there is also gunzip, which would allow us to get rid of the /unzip/ branch.

@Kaliumhexacyanoferrat
Copy link
Author

So I will close this here and add the information to the original ticket.

@Kaliumhexacyanoferrat Kaliumhexacyanoferrat deleted the improvement/result-compression branch November 27, 2024 10:47
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