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

rpc: linear time batch response matching #23856

Merged
merged 1 commit into from
Nov 4, 2021

Conversation

fjl
Copy link
Contributor

@fjl fjl commented Nov 4, 2021

This avoids quadratic time complexity in the lookup of the batch element
corresponding to an RPC response. Unfortunately, the new approach
requires additional memory for the mapping from ID to index.

Fixes #22805

This avoids quadratic time complexity in the lookup of the batch element
for an RPC response. Unfortunately, this requires additional allocation
for the map.
@fjl fjl requested a review from holiman as a code owner November 4, 2021 11:50
Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fjl fjl merged commit 53b94f1 into ethereum:master Nov 4, 2021
@fjl fjl added this to the 1.10.12 milestone Nov 4, 2021
sidhujag pushed a commit to syscoin/go-ethereum that referenced this pull request Nov 4, 2021
This avoids quadratic time complexity in the lookup of the batch element
corresponding to an RPC response. Unfortunately, the new approach
requires additional memory for the mapping from ID to index.

Fixes ethereum#22805
yongjun925 pushed a commit to DODOEX/go-ethereum that referenced this pull request Dec 3, 2022
This avoids quadratic time complexity in the lookup of the batch element
corresponding to an RPC response. Unfortunately, the new approach
requires additional memory for the mapping from ID to index.

Fixes ethereum#22805
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.

rpc: O(N**2) batch response matching
2 participants