-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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: possible performance improvement for filters? #20177
Comments
I agree it would be nice to have a new But it's worse! The
Line 1799 in 122206d
and it internally performs a base58 decode into a local variable solana/client/src/rpc_filter.rs Line 69 in 122206d
...every time. ☠️ It should be a big win to memoize that base58 decode so it only occurs once per filter per RPC request (and even if we added a |
If we add |
A |
Thanks for clearing this up. I'll try to solve this issue. |
This issue has been automatically locked since there has not been any activity in past 7 days after it was closed. Please open a new issue for related bugs. |
Problem
solana/client/src/rpc_filter.rs
Lines 49 to 53 in ca83167
MemcmpEncodedBytes
enum looks not healthy, whyBinary
variant hasString
as inner? And more, thisString
have bytes encoded in base58 😧I'm not sure about the performance impact but decode base58 string each time for filter account on requests like
get_program_accounts
looks not good.Proposed Solution
Binary
toBase58
and addBinary(Vec<u8>)
.Binary(String)
and add new variant withVec<u8>
(name?).The text was updated successfully, but these errors were encountered: