You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This may result in HUGE heap usage when streaming BIG responses, which is primary use case for using compression in responses.
Instead, it should wrap response.getOutputStream() and simply pump content to it. Even better, use some threshold and buffer responses under it, compressing only if response size end up to be over that threshold.
As currently implemented,
GZipResponseStream
buffers whole response and compresses it only upon closing:https://github.com/pippo-java/pippo/blob/master/pippo-core/src/main/java/ro/pippo/core/gzip/GZipResponseStream.java
This may result in HUGE heap usage when streaming BIG responses, which is primary use case for using compression in responses.
Instead, it should wrap
response.getOutputStream()
and simply pump content to it. Even better, use some threshold and buffer responses under it, compressing only if response size end up to be over that threshold.Idea for better implementation:
https://github.com/oblac/jodd/blob/master/jodd-servlet/src/main/java/jodd/servlet/filter/GzipResponseStream.java
The text was updated successfully, but these errors were encountered: