lib: changed functional logic in cluster schedulers · nodejs/node@7dd001c · GitHub
Skip to content

Commit 7dd001c

Browse files
yashLadhatargos
authored andcommitted
lib: changed functional logic in cluster schedulers
Free pool in round_robin scheduler is implemented as an array. There were constant lookups being for distributing load on other workers in free pool. Reimplementing in Map will create will be more performant as compared to Array implementation. This was done for all in past but free wasn't implemented at that time. PR-URL: #32505 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent 06d16cf commit 7dd001c

2 files changed

Lines changed: 18 additions & 18 deletions

File tree

lib/internal/cluster/round_robin_handle.js

Lines changed: 10 additions & 9 deletions

lib/internal/cluster/shared_handle.js

Lines changed: 8 additions & 9 deletions

0 commit comments

Comments
 (0)