<p></p>
<p>Here are performance test results.</p>
<p>PR version:<br>
100 calls of daoStateService.getTxOutputsByTxOutputType(TxOutputType.BSQ_OUTPUT) took 2508 ms<br>
100000 calls of daoStateService.existsTxOutput(TxOutputKey) took 2 ms<br>
100000 calls of daoStateService.getTxOutput(TxOutputKey) took 3 ms</p>
<p>Master:<br>
100 calls of daoStateService.getTxOutputsByTxOutputType(TxOutputType.BSQ_OUTPUT) took 4206 ms<br>
100 calls of daoStateService.existsTxOutput(TxOutputKey) took 2907 ms<br>
100 calls of daoStateService.existsTxOutput(TxOutputKey) took 2946 ms</p>
<p>The daoStateService.getTxOutputsByTxOutputType call takes about 30 ms which is very expensive and<br>
requires more improvement but as it iterates the cache map it is expected to has little impact.</p>
<p>The other 2 methods havea huge difference.<br>
Note that iterations have been increased from 100 to 100000 to get some meaningful time log.</p>
<p>I think we should measure all methods and find more hotspots...</p>
<p>As its a risky domain, I leave it to maintainers to merge the PR or delay it for later.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/4951#issuecomment-745538092">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNXTJYH3DYRS4L4BLODSU67DHANCNFSM4U3ZUCCA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNSFL2YQHKKW6U36Q6DSU67DHA5CNFSM4U3ZUCCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFRYAELA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/4951#issuecomment-745538092",
"url": "https://github.com/bisq-network/bisq/pull/4951#issuecomment-745538092",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>