Skip to content

perf(runner): refactor requestToActor to O(1) Map - #5635

Open
iinaa-eimrit wants to merge 1 commit into
rivet-dev:mainfrom
iinaa-eimrit:fix-issue-5581
Open

perf(runner): refactor requestToActor to O(1) Map#5635
iinaa-eimrit wants to merge 1 commit into
rivet-dev:mainfrom
iinaa-eimrit:fix-issue-5581

Conversation

@iinaa-eimrit

Copy link
Copy Markdown

Fixes #5581

Description

Refactored #requestToActor inside Tunnel from an array to an O(1) Map. This prevents severe event loop blocking during high-concurrency tunneling by eliminating an O(N) linear array scan.

cc @jog1t

@iinaa-eimrit

Copy link
Copy Markdown
Author

Hey @jog1t, @NathanFlurry! Just a quick ping to see if you have a moment to review this performance optimization. Let me know if you need any adjustments!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf(runner): O(N) array lookup in requestToActor causes severe CPU bottleneck under high load

1 participant