rust-electrum-client icon indicating copy to clipboard operation
rust-electrum-client copied to clipboard

Test to showcase high memory consumption of `batch_script_get_history`

Open da-kami opened this issue 3 years ago • 2 comments

When running batch_script_get_history on a Linux machine with processing many scripts the memory consumption is enormous and does not go down. This test showcases this behavior.

When triggering the test with 7000 scripts we see a memory consumption of about 4GB. Note that you can add a loop to re-trigger the batching to see that the memory does not get freed.

This problem could be reproduced on multiple Linux machine, but not on MacOS.

da-kami avatar Oct 21 '22 04:10 da-kami

Thanks for test to repro this issue, any ideas why it might be happening? And do you think this would be a common usecase? In most cases I'd expect this to be used with smaller single users wallets and for very larger server wallets something like the bitcond RPC client (or a future BIP 157/158 client).

notmandatory avatar Nov 12 '23 01:11 notmandatory

Memory never being freed is an issue no matter what size though. I feel like there is a lot to improve in the way we are using electrum at every level. I know @evanlinjin has ideas.

LLFourn avatar Nov 16 '23 02:11 LLFourn