Skip to content

Conversation

@ronag
Copy link
Member

@ronagronag commented Apr 27, 2018

Avoid unnecessary function bind.

Also fixes a bug where kProxySocket was assigned null on the wrong object as well as properly cleanup the stream object.

Checklis
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-botnodejs-github-bot added dont-land-on-v4.x http2 Issues or PRs related to the http2 subsystem. labels Apr 27, 2018
@ronagronagforce-pushed the http2-compat-perf branch 4 times, most recently from ebc8bb2 to 34ad49aCompareApril 27, 2018 23:02
@ronagronag changed the title http2: compat avoid bind and propertly cleanup kProxySockethttp2: compat avoid bind and properly cleanup streamApr 27, 2018
@ronagronagforce-pushed the http2-compat-perf branch 3 times, most recently from d57ba33 to 6c86160CompareApril 27, 2018 23:11
Copy link
Contributor

Choose a reason for hiding this comment

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

Why these extra variables instead of just:

this.sendTrailers(this[kResponse][kTrailers]);

?

Copy link
MemberAuthor

@ronagronagApr 27, 2018

Choose a reason for hiding this comment

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

No particular reason. Just style. I'm fine with changing if you want me to?

@ronagronagforce-pushed the http2-compat-perf branch from 6c86160 to 8a5874aCompareApril 27, 2018 23:37
Copy link
Contributor

Choose a reason for hiding this comment

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

stream should be this

@ronagronagforce-pushed the http2-compat-perf branch from 8a5874a to 96b0de9CompareApril 27, 2018 23:40
Copy link
Contributor

@apapirovskiapapirovski left a comment

Choose a reason for hiding this comment

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

This is on a good track but needs a bit of cleanup.

Copy link
Contributor

Choose a reason for hiding this comment

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

onStreamCloseRequest? It's not really onRequestFinish.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please don't reassign this.

Copy link
Contributor

Choose a reason for hiding this comment

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

Are all these detachments necessary? It will certainly make performance worse.

Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above: more accurate name and don't re-assign this please.

Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above. Unless this is 100% necessary, it would be better not to.

Copy link
Contributor

Choose a reason for hiding this comment

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

This change doesn't seem to relate to this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

This change doesn't seem to relate to this PR.

@ronagronagforce-pushed the http2-compat-perf branch 2 times, most recently from d7a0fbd to 525429aCompareApril 28, 2018 11:47
@ronag
Copy link
MemberAuthor

@apapirovski cleaned up

@ronagronagforce-pushed the http2-compat-perf branch 2 times, most recently from 20d1dce to 93c4f7dCompareApril 28, 2018 11:49
Copy link
Contributor

Choose a reason for hiding this comment

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

res === undefined would be cleaner check here.

Copy link
Contributor

Choose a reason for hiding this comment

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

req === undefined is more precise. Also please move const state = after the check.

@ronagronagforce-pushed the http2-compat-perf branch from 93c4f7d to 823bc93CompareApril 28, 2018 14:40
@ronagronagforce-pushed the http2-compat-perf branch from 823bc93 to ae50653CompareApril 28, 2018 14:41
Copy link
Contributor

@apapirovskiapapirovski left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

@apapirovski
Copy link
Contributor

@BridgeARBridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 29, 2018
@apapirovski
Copy link
Contributor

ping @nodejs/http2 would be nice to have at least one more review on this.

@mcollina
Copy link
Member

Also fixes a bug where kProxySocket was assigned null on the wrong object as well as properly cleanup the stream object.

Can you add a test for this?

@apapirovski
Copy link
Contributor

FWIW I don't think it's possible to test this without exporting the kProxySocket symbol. Although
since it's in internal, it's probably ok to do so.

@mcollina
Copy link
Member

👍 to exporting in the internal module.

@apapirovski
Copy link
Contributor

CI: https://ci.nodejs.org/job/node-test-pull-request/14865/

I will land this once done and create a test myself in a separate PR.

apapirovski pushed a commit that referenced this pull request May 16, 2018
PR-URL: #20374 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
@apapirovski
Copy link
Contributor

Landed in 0d762af

MylesBorins pushed a commit that referenced this pull request May 22, 2018
PR-URL: #20374 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
@addaleaxaddaleax mentioned this pull request May 22, 2018
kjin pushed a commit to kjin/node that referenced this pull request Aug 23, 2018
PR-URL: nodejs#20374 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
kjin pushed a commit to kjin/node that referenced this pull request Sep 11, 2018
PR-URL: nodejs#20374 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
kjin pushed a commit to kjin/node that referenced this pull request Sep 19, 2018
PR-URL: nodejs#20374 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
kjin pushed a commit to kjin/node that referenced this pull request Oct 16, 2018
PR-URL: nodejs#20374 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
BethGriggs pushed a commit that referenced this pull request Oct 17, 2018
Backport-PR-URL: #22850 PR-URL: #20374 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
@BethGriggsBethGriggs mentioned this pull request Oct 30, 2018
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.http2Issues or PRs related to the http2 subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@ronag@apapirovski@mcollina@mscdex@jasnell@trivikr@BridgeAR@nodejs-github-bot