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

cluster: replace forEach with for..of in lib/internal/cluster/ directory #50317

Merged
merged 5 commits into from
May 12, 2024

Conversation

jerome-benoit
Copy link
Contributor

No description provided.

@nodejs-github-bot nodejs-github-bot added cluster Issues and PRs related to the cluster subsystem. needs-ci PRs that need a full CI run. labels Oct 21, 2023
@MrHBS
Copy link

MrHBS commented Oct 22, 2023

Out of curiosity why this change?

@jerome-benoit
Copy link
Contributor Author

jerome-benoit commented Oct 22, 2023

Out of curiosity why this change?

Coding style consistency.
There might also have performance implications at using implicitly iterator on collections (no boundary check, less memory footprint, ...), especially on large collection. forEach is probably using already iterator under the hood, with for...of it's explicit and does not depend on an helper implementation.

Jérôme Benoit added 4 commits May 11, 2024 21:20
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
@aduh95 aduh95 force-pushed the foreach2for-cluster branch from c348acb to 92a9ea3 Compare May 11, 2024 18:20
lib/internal/cluster/primary.js Outdated Show resolved Hide resolved
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
@jerome-benoit jerome-benoit requested a review from aduh95 May 11, 2024 19:26
@aduh95 aduh95 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. labels May 11, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 11, 2024
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@aduh95 aduh95 added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels May 12, 2024
@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 May 12, 2024
@nodejs-github-bot
Copy link
Collaborator

Commit Queue failed
- Loading data for nodejs/node/pull/50317
✔  Done loading data for nodejs/node/pull/50317
----------------------------------- PR info ------------------------------------
Title      cluster: replace forEach with for..of in lib/internal/cluster/ directory (#50317)
Author     Jérôme Benoit  (@jerome-benoit, first-time contributor)
Branch     jerome-benoit:foreach2for-cluster -> nodejs:main
Labels     cluster, author ready, needs-ci, commit-queue-squash
Commits    5
 - cluster: replace forEach with for..of in lib/internal/cluster/ directory
 - refactor: silence linter
 - build: silence linter
 - fix: handles in a SafeMap
 - Update lib/internal/cluster/primary.js
Committers 2
 - Antoine du Hamel 
 - GitHub 
PR-URL: https://github.com/nodejs/node/pull/50317
Reviewed-By: James M Snell 
Reviewed-By: Antoine du Hamel 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/50317
Reviewed-By: James M Snell 
Reviewed-By: Antoine du Hamel 
--------------------------------------------------------------------------------
   ℹ  This PR was created on Sat, 21 Oct 2023 16:56:59 GMT
   ✔  Approvals: 2
   ✔  - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/50317#pullrequestreview-1702814874
   ✔  - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/50317#pullrequestreview-2051249874
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2024-05-12T07:22:07Z: https://ci.nodejs.org/job/node-test-pull-request/59150/
- Querying data for job/node-test-pull-request/59150/
   ✔  Last Jenkins CI successful
   ⚠  PR author is a new contributor: @jerome-benoit(jerome.benoit@piment-noir.org)
   ⚠  - commit 001629ef3769 is authored by jerome.benoit@sap.com
   ⚠  - commit 3deccf496fcb is authored by jerome.benoit@sap.com
   ⚠  - commit 0b1f164bdc43 is authored by jerome.benoit@sap.com
   ⚠  - commit 92a9ea30040f is authored by jerome.benoit@sap.com
--------------------------------------------------------------------------------
   ✔  Aborted `git node land` session in /home/runner/work/node/node/.ncu
https://github.com/nodejs/node/actions/runs/9053086020

@aduh95 aduh95 merged commit 7b2dc79 into nodejs:main May 12, 2024
65 checks passed
@aduh95
Copy link
Contributor

aduh95 commented May 12, 2024

Landed in 7b2dc79

targos pushed a commit that referenced this pull request May 12, 2024
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
PR-URL: #50317
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
marco-ippolito pushed a commit that referenced this pull request Jun 17, 2024
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
PR-URL: #50317
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
marco-ippolito pushed a commit that referenced this pull request Jun 17, 2024
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
PR-URL: #50317
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
marco-ippolito pushed a commit that referenced this pull request Jun 17, 2024
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
PR-URL: #50317
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
sophoniie pushed a commit to sophoniie/node that referenced this pull request Jun 20, 2024
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
PR-URL: nodejs#50317
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
bmeck pushed a commit to bmeck/node that referenced this pull request Jun 22, 2024
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
PR-URL: nodejs#50317
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@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. cluster Issues and PRs related to the cluster subsystem. commit-queue-failed An error occurred while landing this pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants