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
Original issue reported on code.google.com by
hearn@google.com
on 15 Jan 2014 at 4:22