I am using v0.17.1 I got about 60,000 accounts, when I call get balance , the CPU will hit 100%, and slow down the whole server.
Thanks for your time
I am using v0.17.1 I got about 60,000 accounts, when I call get balance , the CPU will hit 100%, and slow down the whole server.
Thanks for your time
Accounts have been removed from Bitcoin Core. However, I doubt that accounts itself influence the run time cost of getbalance, but rather the number of txs does. Also, the wallet should cache the result for each tx, so that the calculation would only happen once and later calls would only iterate all txs.
We don’t patch old releases for performance improvements, so could you try to reproduce this with 0.18.0 or master? Alternatively, share the approximate number of txs, if they involve watchonly addresses, and the average number of inputs/outputs of those txs. Thanks
The getbalance RPC iterates over mapWallet, which contains every transaction in the wallet.
If there are lots of transactions then it’s going to be slow.