http: replace superfluous property with getter/setter by ronag · Pull Request #29015 · nodejs/node
Conversation
Slightly reduces memory overhead by replacing superfluous property with getter/setter.
Checklist
-
make -j4 test(UNIX), orvcbuild test(Windows) passes - tests and/or benchmarks are included
- documentation is changed or added
- commit message follows commit guidelines
ronag
changed the title
http: replace duplicate property with getter/setter
http: replace superfluous property with getter/setter
AFAIK getters/setters like this incur noticeable overhead, so perhaps we should be adjusting the documentation to more strongly recommend socket over connection.
Also if we're making this change we should also replace all usage of .connection in core with .socket to avoid the overhead.
jasnell
added
deprecations
labels
Aug 7, 2019This was referenced
Jan 20, 2021This was referenced
Sep 5, 2021This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters