massa icon indicating copy to clipboard operation
massa copied to clipboard

Pack multiple vals into a single VarInt during (de)serialization where possible

Open Ben-PH opened this issue 2 years ago • 0 comments

posting issue at very end of week. come back monday to fill out

Is your feature request related to a problem? Please describe.

We may be able to pack (VarInts)[https://developers.google.com/protocol-buffers/docs/encoding] more efficiently into our serialized data. Things such as len values, versions, etc. could possibly be packed into a single 64bit var-int, thus reducing the overall size. This would add overhead in the form of extra processing to pack/unpack, and more code maintenance in the form of having to keep things consistent and efficient.

This might fall under the realm of "premature optimization." right now. Without understanding what makes the lions-share of the ledgers size, it's hard to say.

Describe the solution you'd like

Ideally, something along the lines of a macro that allows one to write code without much change, but the code automagically expands to handle the packing/unpacking.

Describe alternatives you've considered TODO

Additional context This is just a thought-bubble right now. I'll leave it up to discussion to determine the priority it deserves.

Ben-PH avatar Jan 20 '23 19:01 Ben-PH