openmina / mina-p2p-messages-rs

1 stars 0 forks source link

Align run-time memory consumption with encoded size #18

Closed akoptelov closed 2 years ago

akoptelov commented 2 years ago

Currently run-time memory consumption is over 1.5 times bigger then bin_prot encoded size. This is because of enum variants with different sizes (see variant-size-differences).

The first step is this fix.

Then we need to generate variants properly, boxing the ones that allocate more memory then others.

akoptelov commented 2 years ago

See also name-placeholder/bin-prot-rs#2.