mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 15:00:30 +01:00
Avoid repeated Set<Tradable> build in transactions view load
Move the line, Set<Tradable> tradables = tradableRepository.getAll(); to the top level of 'TransactionsView.updateList', instead of needlessly calling 'TradableRepository.getAll' (which builds a new set every invocation) for each wallet transaction being iterated over. This was causing a significant slowdown of the view load.
This commit is contained in:
parent
3aacc99f38
commit
fb78345ba3
1 changed files with 2 additions and 2 deletions
|
@ -288,11 +288,11 @@ public class TransactionsView extends ActivatableView<VBox, Void> {
|
|||
}
|
||||
|
||||
private void updateList() {
|
||||
Set<Tradable> tradables = tradableRepository.getAll();
|
||||
|
||||
List<TransactionsListItem> transactionsListItems = btcWalletService.getTransactions(false)
|
||||
.stream()
|
||||
.map(transaction -> {
|
||||
Set<Tradable> tradables = tradableRepository.getAll();
|
||||
|
||||
TransactionAwareTradable maybeTradable = tradables.stream()
|
||||
.map(tradable -> {
|
||||
if (tradable instanceof OpenOffer) {
|
||||
|
|
Loading…
Add table
Reference in a new issue