-
Notifications
You must be signed in to change notification settings - Fork 646
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
Address Service: Resolve memory issues with large queries #372
Comments
Using stream transforms has helped with memory issues in combination with lowering the |
WIP branch is here: https://github.com/braydonf/bitcore-node/tree/large-queries |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A few ideas for optimization of memory usage for large queries:
getAddressSummary
: Create an iterator to sum the balances as we're handling the inputs and outputs, instead of needing to keep the entire inputs and outputs in memory. These results could optionally be cached by block height, to optimize future queries.getAddressHistory
: When retrieving the address history, instead of getting all inputs and outputs and then combining them by transaction all at once. We could do that process based on chunks through a range of block heights, and stream the response, keeping the memory usage lower. This could be a new methodcreateAddressHistoryStream
. Related:combineTransactionInfo
memory usage #354The text was updated successfully, but these errors were encountered: