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
As reported here the performance of the size limiter not that good for huge requests. This is unlikely even noticeable for a typical request, but in the case of uploading file chunks it is problematic
The current method uses LimitReader to get the allowed part of the request and serves it from bytes buffer after the read. Actually, I'm not even sure why it's causing such a delay. I suspect some deficiency of the testing method, i.e. with size limiter in place the actual read of the data enforced, but maybe without it that read just skipped
Anyhow, for large limits the current approach may utilize a lot of memory, even if the performance problem is not real. Probably the better way to deal with this is to hijack the response writer and deal with the limit on the writer level
The text was updated successfully, but these errors were encountered:
As reported here the performance of the size limiter not that good for huge requests. This is unlikely even noticeable for a typical request, but in the case of uploading file chunks it is problematic
The current method uses
LimitReader
to get the allowed part of the request and serves it from bytes buffer after the read. Actually, I'm not even sure why it's causing such a delay. I suspect some deficiency of the testing method, i.e. with size limiter in place the actual read of the data enforced, but maybe without it that read just skippedAnyhow, for large limits the current approach may utilize a lot of memory, even if the performance problem is not real. Probably the better way to deal with this is to hijack the response writer and deal with the limit on the writer level
The text was updated successfully, but these errors were encountered: