bisq/core
Steven Barclay f02bc787d5
Optimize 'getNumPastTrades' to speed up trade history view
Reduce a bottleneck in the closed-trades-view load & table scrolling,
caused by a call to 'ClosedTradesManager.getNumPastTrades' for each
list item displayed. This repeatedly scans the entire collection of
closed trades and BSQ swap trades, in order to count all those which
share a given peer node address. (Scanning the BSQ swap trades is
particularly slow due to their filtering by tx confirmation status.)

To this end, cache the counts of trades by peer node address with a
nullable Multiset field in ClosedTradesManager & BsqSwapTradeManager,
so that the trades are scanned at most once when the view loads. Add
listeners to clear the respective cache when the trade list changes or
the BSQ wallet txs change.
2023-02-01 19:59:48 +08:00
..
.tx Update translations for v1.9.0 2022-04-28 13:12:59 +02:00
src Optimize 'getNumPastTrades' to speed up trade history view 2023-02-01 19:59:48 +08:00
update_translations.sh Add Polish translation 2021-12-01 15:13:57 +01:00