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

[Core] Add Compression middleware #9207

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

driusan
Copy link
Collaborator

@driusan driusan commented Apr 15, 2024

This adds support to LORIS for optionally compressing the response to the client if the Accept-Encoding header includes support for gzip using a new PSR-15 middleware. In this pull request the middleware is added for any data framework menu which uses the format=binary parameter and it used for the new data query tool results.

This can significantly improve the loading time of large datasets. For instance, when combined with PR#9195 on the UK biobank the size of the result downloaded from the candidate_list is reduced from 47.48MB to 7.45MB according to the Firefox dev tools and there are similar reductions in the transferred size for data query results with arbitrary queries.

@driusan
Copy link
Collaborator Author

driusan commented Apr 15, 2024

Sending as a draft because this is not intended to be merged until after the current release, but should be ready if anyone wants to look at or test it.

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.

None yet

1 participant