Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http2: send out pending data earlier #29398

Closed
wants to merge 1 commit into from

Conversation

addaleax
Copy link
Member

@addaleax addaleax commented Sep 1, 2019

If there’s a lot of data waiting on a given stream, send
it out early, if possible. This helps trigger the backpressure
mechanism introduced in 8a4a193 at a better time.

(Will look into writing tests for this.)

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

If there’s a lot of data waiting on a given stream, send
it out early, if possible. This helps trigger the backpressure
mechanism introduced in 8a4a193 at a better time.
@addaleax addaleax added http2 Issues or PRs related to the http2 subsystem. lts-watch-v8.x labels Sep 1, 2019
@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Sep 1, 2019
@@ -1186,7 +1186,10 @@ int Http2Session::OnDataChunkReceived(nghttp2_session* handle,
stream->inbound_consumed_data_while_paused_ += avail;

// If we have a gathered a lot of data for output, try sending it now.
if (session->outgoing_length_ > 4096) session->SendPendingData();
if (session->outgoing_length_ > 4096 ||
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: not a c++ expert, but we can move 4096 to variable and re-use.

@nodejs-github-bot
Copy link
Collaborator

@Trott
Copy link
Member

Trott commented Sep 7, 2019

Landed in 1cde519

@Trott Trott closed this Sep 7, 2019
Trott pushed a commit to Trott/io.js that referenced this pull request Sep 7, 2019
If there’s a lot of data waiting on a given stream, send
it out early, if possible. This helps trigger the backpressure
mechanism introduced in 8a4a193 at a better time.

PR-URL: nodejs#29398
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Sep 20, 2019
If there’s a lot of data waiting on a given stream, send
it out early, if possible. This helps trigger the backpressure
mechanism introduced in 8a4a193 at a better time.

PR-URL: #29398
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@BridgeAR BridgeAR mentioned this pull request Sep 24, 2019
BethGriggs pushed a commit that referenced this pull request Oct 17, 2019
If there’s a lot of data waiting on a given stream, send
it out early, if possible. This helps trigger the backpressure
mechanism introduced in 8a4a193 at a better time.

PR-URL: #29398
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@BethGriggs BethGriggs mentioned this pull request Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. http2 Issues or PRs related to the http2 subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants