HTTP2: Update local flow-controller on Channel.read() if needed (#9400)
Motivation: We should better update the flow-controller on Channel.read() to reduce overhead and memory overhead. See https://github.com/netty/netty/pull/9390#issuecomment-513008269 Modifications: Move updateLocalWindowIfNeeded() to doBeginRead() Result: Reduce memory overhead
This commit is contained in:
parent
4db38b4e0c
commit
bcad76e2db
@ -757,6 +757,8 @@ abstract class AbstractHttp2StreamChannel extends DefaultAttributeMap implements
|
||||
if (!isActive()) {
|
||||
return;
|
||||
}
|
||||
updateLocalWindowIfNeeded();
|
||||
|
||||
switch (readStatus) {
|
||||
case IDLE:
|
||||
readStatus = ReadStatus.IN_PROGRESS;
|
||||
@ -833,8 +835,6 @@ abstract class AbstractHttp2StreamChannel extends DefaultAttributeMap implements
|
||||
readStatus = ReadStatus.IDLE;
|
||||
}
|
||||
|
||||
updateLocalWindowIfNeeded();
|
||||
|
||||
allocHandle.readComplete();
|
||||
pipeline().fireChannelReadComplete();
|
||||
// Reading data may result in frames being written (e.g. WINDOW_UPDATE, RST, etc..). If the parent
|
||||
|
Loading…
Reference in New Issue
Block a user