-
Notifications
You must be signed in to change notification settings - Fork 221
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
fix: reduce console wallet tui memory usage #3389
fix: reduce console wallet tui memory usage #3389
Conversation
f28e87e
to
2bbd04d
Compare
2bbd04d
to
db07817
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
#[derive(Clone)] | ||
pub struct CompletedTransactionInfo { | ||
pub tx_id: TxId, | ||
pub source_public_key: CommsPublicKey, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can reduce memory usage even more by storing the text representation instead of the crypto primitive
pub source_public_key: CommsPublicKey, | |
pub source_public_key: String, |
pub struct CompletedTransactionInfo { | ||
pub tx_id: TxId, | ||
pub source_public_key: CommsPublicKey, | ||
pub destination_public_key: CommsPublicKey, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same
Description
Transactional information is copied to an internal buffer for the console wallet to use in its screen refresh tick cycle and updates to this information are event-driven. This PR reduces the memory overhead required to keep transactions in their various life cycle stages in the buffer memory.
Motivation and Context
Unnecessary memory was allocated to the internal buffer as the entire completed transaction body was kept while only the signature(s) and maturity is required. This is more significant for large wallets.
How Has This Been Tested?
System-level testing