lib: refactor to use mapping in cluster master#36250
Merged
aduh95 merged 1 commit intonodejs:masterfrom Jan 10, 2021
Merged
Conversation
b98515a to
f8fd5a1
Compare
mscdex
reviewed
Nov 24, 2020
lib/internal/cluster/master.js
Outdated
Contributor
There was a problem hiding this comment.
What if we just added message to the signature here (to appease V8's JIT) and then treated online() as the same as the other methods in onmessage() to simplify things completely?
Contributor
Author
There was a problem hiding this comment.
Makes sense actually 👍 reason for not doing this was the second argument passed will be unused, so if it is not of concern i can make the changes.
f8fd5a1 to
9e6defb
Compare
jasnell
reviewed
Nov 25, 2020
9e6defb to
3acfccb
Compare
aduh95
approved these changes
Dec 29, 2020
jasnell
approved these changes
Dec 31, 2020
Collaborator
Contributor
|
@yashLadha can you rebase to fix the conflict please? |
3acfccb to
452491f
Compare
Collaborator
Collaborator
Collaborator
Cluster master message handler is basically doing the same thing for different message actions which can be avoided. Thus move to method mapping object and doing a single lookup to find the function to execute and it doesnot exists, skip the execution chain. PR-URL: nodejs#36250 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
452491f to
88d8dde
Compare
Contributor
|
Landed in 88d8dde |
danielleadams
pushed a commit
that referenced
this pull request
Jan 12, 2021
Cluster master message handler is basically doing the same thing for different message actions which can be avoided. Thus move to method mapping object and doing a single lookup to find the function to execute and it doesnot exists, skip the execution chain. PR-URL: #36250 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Merged
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes