FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

os: improve networkInterfaces() performance by mscdex · Pull Request #25410 · nodejs/node · GitHub

/ node Public

os: improve networkInterfaces() performance - #25410

Closed
mscdex wants to merge 1 commit into
nodejs:masterfrom
mscdex:os-networkinterfaces-refactor
Closed

os: improve networkInterfaces() performance#25410
mscdex wants to merge 1 commit into
nodejs:masterfrom
mscdex:os-networkinterfaces-refactor

Conversation

mscdex commented Jan 9, 2019
edited
Loading

Copy link
Copy Markdown
Contributor

With included benchmark:

                                  confidence improvement accuracy (*)   (**)  (***)
 os/networkInterfaces.js n=10000        ***      3.86 %       ±0.26% ±0.34% ±0.44%

and also makes the C++ implementation mirror the C++ cpu enumeration code for whatever that's worth.

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

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

mscdex added os Issues and PRs related to the os subsystem. performance Issues and PRs related to the performance of Node.js. labels Jan 9, 2019

Copy link
Copy Markdown
Collaborator

nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Jan 9, 2019
Comment thread lib/os.js Outdated

jdalton Jan 9, 2019
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Can you explain the perf benefit for networkInterfaces()?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

What do you mean?

jdalton Jan 9, 2019
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

At first glance it looks like a lot of unrolled code with an extra object being created. Could you please step me through the optimization being done in networkInterfaces(). If you drop the rework to networkInterfaces() do you still see perf wins?

mscdex Jan 9, 2019
edited
Loading

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It's more or less moving the object creation from C++ to JS land, just like we do for CPU enumeration.

BridgeAR left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I personally wonder if it would not be faster to just move everything to C++ instead.

The changes LGTM besides the result object. It should be kept as regular object.

Comment thread lib/os.js Outdated
mscdex force-pushed the os-networkinterfaces-refactor branch from d7b7cde to b505976 Compare January 9, 2019 19:33

Copy link
Copy Markdown
Member

BridgeAR added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Jan 10, 2019

danbev commented Jan 14, 2019

Copy link
Copy Markdown
Contributor

Landed in 5021b25.

danbev closed this Jan 14, 2019
danbev pushed a commit that referenced this pull request Jan 14, 2019
PR-URL: #25410
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
mscdex deleted the os-networkinterfaces-refactor branch January 14, 2019 07:14
addaleax pushed a commit that referenced this pull request Jan 14, 2019
PR-URL: #25410
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
BridgeAR mentioned this pull request Jan 16, 2019
BridgeAR pushed a commit to BridgeAR/node that referenced this pull request Jan 16, 2019
PR-URL: nodejs#25410
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins mentioned this pull request Jan 24, 2019
This 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. os Issues and PRs related to the os subsystem. performance Issues and PRs related to the performance of Node.js.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL