hyperledger-iroha / iroha

Iroha - A simple, enterprise-grade decentralized ledger
https://wiki.hyperledger.org/display/iroha
Apache License 2.0
438 stars 280 forks source link

perf: Reduce memory usage of `CommittedTransaction` #5089

Closed dima74 closed 1 month ago

dima74 commented 1 month ago

Context

Related: #5083

Solution

CommittedTransaction::error takes 200 bytes and is None in case of a successful transaction. Using Option<Box<...> reduces memory usage of iroha approximately by 10% (considering that all transactions are successful and with testing configuration as in #5083)

Checklist

mversic commented 1 month ago

relevant #5001