[bisq-network/bisq] Add transient tx map to DaoState to speed up getTx queries (#3773)
Steven Barclay
notifications at github.com
Tue Dec 10 20:29:19 UTC 2019
stejbac commented on this pull request.
> @@ -98,6 +102,11 @@ public static DaoState getClone(DaoState daoState) {
@Getter
private final List<DecryptedBallotsWithMerits> decryptedBallotsWithMeritsList;
+ // Transient data used only as an index - must be kept in sync with the block list
+ @Getter
+ @JsonExclude
+ private transient final Map<String, Tx> txMap; // key is txId
It's using a hash table rather than a tree set, so I don't think the additional memory will be a problem - there are only about 10,000 txs or so right now, so I don't think it will take up more than 100KB or so. (The fact that DaoState.blocks is a linked list instead of an array list is probably a more significant memory issue that could be easily fixed.)
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/3773#discussion_r356260890
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191210/c0df044c/attachment.html>
More information about the bisq-github
mailing list