novitski / bitcoinj

Automatically exported from code.google.com/p/bitcoinj
Apache License 2.0
0 stars 0 forks source link

Rethink WalletEventListener.onTransactionConfidenceChanged #511

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Profiling the replay process for Andreas' megawallet shows a surprising amount 
of time spent simply iterating transactions in order to call them for this 
event listener. The problem is confidence stores the depth and work done rather 
than recalculate it, so every transaction is updated for every block. With a 
lot of transactions, that's a lot of work per block.

Andreas uses this event for a bunch of things in the UI, for example, as a 
central place to trigger recalculation of the list (he adds some throttling on 
top).

With some tweaks in both bitcoinj and the Android app we can be much smarter 
about this and avoid doing lots of useless work.

Original issue reported on code.google.com by hearn@google.com on 15 Jan 2014 at 4:22

GoogleCodeExporter commented 9 years ago
dogecoinj hit this problem as well.

Original comment by mh.in.en...@gmail.com on 17 Mar 2014 at 11:31