Loris icon indicating copy to clipboard operation
Loris copied to clipboard

[Core] Add Compression middleware

Open driusan opened this issue 1 year ago • 1 comments

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 avatar Apr 15 '24 16:04 driusan

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.

driusan avatar Apr 15 '24 16:04 driusan