-
Notifications
You must be signed in to change notification settings - Fork 431
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
Optimize ABI API to have less allocation #7591
Comments
Hi @LukaszRozmej can I work on this? I read a bit about streams and spans. Streams are likely to work better when we have large chunk of data of variable sizes while spans work better with structured fixed-size data and the latter offers better performance enhancement, maintains concurrency in a better way. What would you suggest is a better approach? I am currently not aware about the data that Abi encoding deals with. |
Sure, take a look at: https://github.com/NethermindEth/nethermind/blob/master/src/Nethermind/Nethermind.Abi/AbiEncoder.cs and everything under it (AbiTypes etc). This now allocates a ton of objects when you Decode and ton of byte arrays when you Encode. Think how can you allocate as little as possible. For inspiration you can check how our Rlp Encoding/Decoding works with NettyRlpStream that is based on pooled memory. |
Encoding and Decoding ABI allocates a lot, rewrite it to a version that will allocate a lot less (stream-like or spans?) and update usages.
The text was updated successfully, but these errors were encountered: