Skip to content

perf: Reduce memory usage of CommittedTransaction#5089

Merged
mversic merged 2 commits intohyperledger-iroha:mainfrom
dima74:diralik/transaction-error-box
Sep 23, 2024
Merged

perf: Reduce memory usage of CommittedTransaction#5089
mversic merged 2 commits intohyperledger-iroha:mainfrom
dima74:diralik/transaction-error-box

Conversation

@dima74
Copy link
Copy Markdown
Contributor

@dima74 dima74 commented Sep 19, 2024

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

  • I've read CONTRIBUTING.md.
  • (optional) I've written unit tests for the code changes.
  • All review comments have been resolved.
  • All CI checks pass.

@mversic
Copy link
Copy Markdown
Contributor

mversic commented Sep 20, 2024

relevant #5001

@dima74 dima74 force-pushed the diralik/transaction-error-box branch from ffaf5bf to f7d4fc8 Compare September 20, 2024 12:43
Comment thread crates/iroha_data_model/src/transaction.rs
dima74 and others added 2 commits September 20, 2024 16:51
Signed-off-by: Dmitry Murzin <diralik@yandex.ru>
Co-authored-by: Marin Veršić <marin.versic101@gmail.com>
Signed-off-by: Dmitry Murzin <diralik@yandex.ru>
@mversic mversic merged commit 0d1fe18 into hyperledger-iroha:main Sep 23, 2024
@dima74 dima74 deleted the diralik/transaction-error-box branch September 23, 2024 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants