Skip to content

http: replace superfluous property with getter/setter - #29015

Closed
ronag wants to merge 1 commit into
nodejs:masterfrom
nxtedition:http-connection
Closed

http: replace superfluous property with getter/setter#29015
ronag wants to merge 1 commit into
nodejs:masterfrom
nxtedition:http-connection

Conversation

@ronag

@ronagronag commented Aug 6, 2019

Copy link
Copy Markdown
Member

Slightly reduces memory overhead by replacing superfluous property with getter/setter.

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

@nodejs-github-botnodejs-github-bot added the http Issues or PRs related to the http subsystem. label Aug 6, 2019
@ronagronag changed the title http: replace duplicate property with getter/setterhttp: replace superfluous property with getter/setterAug 6, 2019
@mscdex

Copy link
Copy Markdown
Contributor

AFAIK getters/setters like this incur noticeable overhead, so perhaps we should be adjusting the documentation to more strongly recommend socket over connection.

@mscdex

Copy link
Copy Markdown
Contributor

Also if we're making this change we should also replace all usage of .connection in core with .socket to avoid the overhead.

@ronag
ronagforce-pushed the http-connection branch 2 times, most recently from 551d5ec to 9fe52d4CompareAugust 6, 2019 12:51
@ronag

ronag commented Aug 6, 2019

Copy link
Copy Markdown
MemberAuthor

@mscdex better?

@ronag
ronagforce-pushed the http-connection branch 7 times, most recently from c16f5f6 to 80a07daCompareAugust 6, 2019 13:56
Comment threaddoc/api/deprecations.md Outdated
Comment threaddoc/api/deprecations.md Outdated
Comment threaddoc/api/deprecations.md Outdated
Comment threaddoc/api/deprecations.md Outdated
@jasnelljasnell added deprecations Issues and PRs related to deprecations. semver-major PRs that contain breaking changes and should be released in the next major version. labels Aug 7, 2019
@ronag

Copy link
Copy Markdown
MemberAuthor

@Trott: this seems ready

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@Trott

Copy link
Copy Markdown
Member

Landed in 0daec61

@TrottTrott closed this Aug 17, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deprecationsIssues and PRs related to deprecations.httpIssues or PRs related to the http subsystem.semver-majorPRs that contain breaking changes and should be released in the next major version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@ronag@mscdex@nodejs-github-bot@Trott@jasnell@addaleax@lpinca@trivikr