fix(token-info): Reduce token-info metadata fetch fan out.#4420
fix(token-info): Reduce token-info metadata fetch fan out.#4420metalurgical wants to merge 5 commits into
Conversation
Replace unbounded token-info join_all fan-out with bounded buffer_unordered concurrency to avoid excessive calls for large token sets.
There was a problem hiding this comment.
Code Review
This pull request replaces join_all with a buffered stream approach in TokenInfoFetcher and CachedTokenInfoFetcher to limit concurrent token info requests to a maximum of 20. Feedback suggests deduplicating the input address list using a HashSet in both fetchers to prevent redundant processing and unnecessary RPC calls.
jmg-duarte
left a comment
There was a problem hiding this comment.
Once again, this PR requires measuring, unsure how long it will take until we have the time to take a jab at it
No problem. Curious whether a fully simulated environment has been investigated/implemented? Not say a playground, more like a staging environment. Say where you could run a full snapshot of orders through and get a benchmark that should reasonably be able to indicate production performance. |
Description
Reduce token-info metadata fetch fan out.
Changes
join_alltoken-info fetching withbuffer_unorderedHow to test
cargo nextest run