Skip to content
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

Redundant database read in addressmanager #1540

Open
JoeGruffins opened this issue Aug 28, 2019 · 1 comment
Open

Redundant database read in addressmanager #1540

JoeGruffins opened this issue Aug 28, 2019 · 1 comment

Comments

@JoeGruffins
Copy link
Member

This issue is an attempt to solve this TODO:

// TODO: Instead of opening a second read transaction after making a change, and
// then fetching the account properties with a new read tx, this can be made
// more performant by simply returning the new account properties during the
// change.

I think this TODO is talking about the AccountProperties method when the account is not imported, one read is done to check if the account is invalid and in the accountInfo map, and another is done to get the last used address index. To make it only read once loadAccountInfo needs to store or return the index data.

However, the TODO also makes a reference to "making a change" which makes me think I don't understand the problem correctly. Are changes being made somewhere else in the code, then this is being called when those changes could return the AccountProperties?

After understanding the problem I would like to work on it.

@JoeGruffins
Copy link
Member Author

I found #1505 that will change his area in a big way. Work should be done on top of that I guess.

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

No branches or pull requests

1 participant