<p><b>@ManfredKarrer</b> commented on this pull request.</p>

<p>Hi <a class="user-mention" data-hovercard-user-id="27722734" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tau3">@tau3</a> I looked now into the PR...<br>
In Bisq most is single threaded (UI thread). Only several areas like P2p network, persistence or cryptographic operations are multi threaded. The code for setting the Bisq market price from the statistics is running in the UI thread, so the parallel stream and concurrent collections will not have any effect here (at least I am not aware of any). Could you make a performance test to check the old version vs. the new version?</p><hr>

<p>In <a href="https://github.com/bisq-network/bisq-core/pull/149#discussion_r210363601">src/test/java/bisq/core/provider/price/PriceFeedServiceTest.java</a>:</p>
<pre style='color:#555'>> +    public void testApplyLatestBisqMarketPrice() {
+        long initialTime = new Date().getTime();
+
+        List<TradeStatistics2> obsoletes = Lists.newArrayList(
+                mockTradeStatistics("a", new Date(initialTime), 5),
+                mockTradeStatistics("b", new Date(initialTime), 6),
+                mockTradeStatistics("b", new Date(initialTime), 7),
+                mockTradeStatistics("a", new Date(initialTime), 8));
+
+        List<TradeStatistics2> stats = new ArrayList<>(obsoletes);
+        stats.add(mockTradeStatistics("a", new Date(initialTime + 100), 8));
+        stats.add(mockTradeStatistics("b", new Date(initialTime + 200), 9));
+
+        Collections.shuffle(stats);
+
+        PriceFeedService service = new PriceFeedService(mock(HttpClient.class),
</pre>
<p>Has to be PriceNodeHttpClient instead of HttpClient (was changed in recent PRs)</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-core/pull/149#pullrequestreview-146563039">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AkpZtqZlwig9TV7i8mvbQScUThPeOX-1ks5uRGgggaJpZM4V-KR7">mute the thread</a>.<img src="https://github.com/notifications/beacon/AkpZthlCMbFIvrVWe3byebZDCTvvIxTBks5uRGgggaJpZM4V-KR7.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/bisq-network/bisq-core","title":"bisq-network/bisq-core","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/bisq-network/bisq-core"}},"updates":{"snippets":[{"icon":"PERSON","message":"@ManfredKarrer commented on #149"}],"action":{"name":"View Pull Request","url":"https://github.com/bisq-network/bisq-core/pull/149#pullrequestreview-146563039"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq-core/pull/149#pullrequestreview-146563039",
"url": "https://github.com/bisq-network/bisq-core/pull/149#pullrequestreview-146563039",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
},
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"hideOriginalBody": "false",
"originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB",
"title": "@ManfredKarrer commented on 149",
"sections": [
{
"text": "Hi @tau3 I looked now into the PR...\r\nIn Bisq most is single threaded (UI thread). Only several areas like P2p network, persistence or cryptographic operations are multi threaded. The code for setting the Bisq market price from the statistics is running in the UI thread, so the parallel stream and concurrent collections will not have any effect here (at least I am not aware of any). Could you make a performance test to check the old version vs. the new version? ",
"activityTitle": "**Manfred Karrer**",
"activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png",
"activitySubtitle": "@ManfredKarrer",
"facts": [

]
}
],
"potentialAction": [
{
"targets": [
{
"os": "default",
"uri": "https://github.com/bisq-network/bisq-core/pull/149#pullrequestreview-146563039"
}
],
"@type": "OpenUri",
"name": "View on GitHub"
},
{
"name": "Unsubscribe",
"@type": "HttpPOST",
"target": "https://api.github.com",
"body": "{\n\"commandName\": \"MuteNotification\",\n\"threadId\": 368616571\n}"
}
],
"themeColor": "26292E"
}
]</script>