Skip to content

Conversation

@promag
Copy link
Contributor

@promag promag commented Jul 11, 2018

The new method CWallet::GetBalances computes all balances in one iteration.
It also avoids repetitive lock/unlock for each wallet transaction.

@promag
Copy link
Contributor Author

promag commented Jul 11, 2018

A wallet with 20k transactions, this improves around 30% of the execution time.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heh

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW this is another experiment where many computations are deduped per wallet tx. Still WIP.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could return WalletBalances instead to avoid having to pass a ton of args?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, wouldn't it add cyclic dependency?

@DrahtBot
Copy link
Contributor

DrahtBot commented Jul 11, 2018

Note to reviewers: This pull request conflicts with the following ones:

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@DrahtBot DrahtBot mentioned this pull request Jul 11, 2018
@promag promag force-pushed the 2018-06-wallet-getbalance branch from 96fffac to 74c8ccf Compare July 11, 2018 23:33
The new method `CWallet::GetBalances` computes all balances in one iteration.
It also avoids repetitive lock/unlock for each wallet transaction.
@promag promag force-pushed the 2018-06-wallet-getbalance branch from 74c8ccf to c32f356 Compare July 13, 2018 15:19
@DrahtBot
Copy link
Contributor

Needs rebase

@promag
Copy link
Contributor Author

promag commented Oct 24, 2018

This introduces duplicate code which. Closing for now because I think a different refactor might make sense.

@promag promag closed this Oct 24, 2018
@promag promag deleted the 2018-06-wallet-getbalance branch October 24, 2018 16:02
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants