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

os: improve network interface performance #46598

Merged

Conversation

BridgeAR
Copy link
Member

This reduces the overhead of getCIDR() to a minimum. No array is allocated anymore and parts are directly sliced out of the netmask string instead.

                                confidence improvement accuracy (*)   (**)  (***)
os/networkInterfaces.js n=10000        ***      3.59 %       ±1.42% ±1.88% ±2.42%

Signed-off-by: Ruben Bridgewater ruben@bridgewater.de

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. os Issues and PRs related to the os subsystem. labels Feb 10, 2023
@BridgeAR BridgeAR force-pushed the improve-network-interface-performance branch from 2a41858 to baf5b0d Compare February 10, 2023 02:44
lib/os.js Outdated Show resolved Hide resolved
lib/os.js Outdated Show resolved Hide resolved
This reduces the overhead of getCIDR() to a minimum. No array is
allocated anymore and parts are directly sliced out of the netmask
string instead.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>
@BridgeAR BridgeAR force-pushed the improve-network-interface-performance branch from baf5b0d to bc967fa Compare February 14, 2023 14:47
@BridgeAR BridgeAR added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. and removed author ready PRs that have at least one approval, no pending requests for changes, and a CI started. labels Feb 14, 2023
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Feb 16, 2023
@nodejs-github-bot
Copy link
Collaborator

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 17, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@BridgeAR BridgeAR added the commit-queue Add this label to land a pull request using GitHub Actions. label Feb 18, 2023
@nodejs-github-bot nodejs-github-bot added commit-queue-failed An error occurred while landing this pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Feb 18, 2023
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/46598
✔  Done loading data for nodejs/node/pull/46598
----------------------------------- PR info ------------------------------------
Title      os: improve network interface performance (#46598)
Author     Ruben Bridgewater  (@BridgeAR)
Branch     BridgeAR:improve-network-interface-performance -> nodejs:main
Labels     os, author ready, needs-ci
Commits    1
 - os: improve network interface performance
Committers 1
 - Ruben Bridgewater 
PR-URL: https://github.com/nodejs/node/pull/46598
Reviewed-By: Antoine du Hamel 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/46598
Reviewed-By: Antoine du Hamel 
--------------------------------------------------------------------------------
   ⚠  Commits were pushed since the last review:
   ⚠  - os: improve network interface performance
   ℹ  This PR was created on Fri, 10 Feb 2023 02:29:09 GMT
   ✔  Approvals: 1
   ✔  - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/46598#pullrequestreview-1292768411
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2023-02-17T19:34:06Z: https://ci.nodejs.org/job/node-test-pull-request/49655/
- Querying data for job/node-test-pull-request/49655/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/4209174794

@BridgeAR BridgeAR added commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Feb 20, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Feb 20, 2023
@nodejs-github-bot nodejs-github-bot merged commit f17a642 into nodejs:main Feb 20, 2023
@nodejs-github-bot
Copy link
Collaborator

Landed in f17a642

targos pushed a commit that referenced this pull request Mar 13, 2023
This reduces the overhead of getCIDR() to a minimum. No array is
allocated anymore and parts are directly sliced out of the netmask
string instead.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: #46598
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
danielleadams pushed a commit that referenced this pull request Apr 11, 2023
This reduces the overhead of getCIDR() to a minimum. No array is
allocated anymore and parts are directly sliced out of the netmask
string instead.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: #46598
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
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 pending requests for changes, and a CI started. needs-ci PRs that need a full CI run. os Issues and PRs related to the os subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants