quantranhong1999 opened a new pull request, #2145: URL: https://github.com/apache/james-project/pull/2145
Rationale: `DefaultMessageSizeEstimator` does not support estimating size for `ChunkedStream` (the wrapper type JAMES IMAP is using to wrap ByteBuf over Netty channel), therefore Netty can not know if it should delay writing this message yet (e.g. IMAP server memory is full and the message size is big then Netty would delay the write). Implementing a `MessageSizeEstimator` support `ChunkedStream` would help. Before: the back-pressure is triggered at minimum (1-2 times over transferring 500 **big** messages) cf: [without chunked stream size estimator.txt](https://github.com/apache/james-project/files/14692758/without.chunked.stream.size.estimator.txt) After: the back-pressure is triggered more often (over 20 times over transferring 500 **big** messages) cf: [with chunked stream size estimator.txt](https://github.com/apache/james-project/files/14692764/with.chunked.stream.size.estimator.txt) cc @vttranlina @chibenwa -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
