[bisq-network/bisq] Improve offer publishing (#4950)

sqrrm notifications at github.com
Wed Dec 16 12:38:04 CET 2020


@sqrrm requested changes on this pull request.



>          }
+
+        OpenOffer openOffer = list.remove(0);
+        if (!openOffers.contains(openOffer) || openOffer.isDeactivated()) {

Shouldn't this be `!openOffer.isDeactivated()` since it's being republished. That was the check before this change.

>          }
+
+        OpenOffer openOffer = list.remove(0);
+        if (!openOffers.contains(openOffer) || openOffer.isDeactivated()) {
+            republishOffers(list);
+        }
+
+        republishOffer(openOffer,
+                () -> UserThread.runAfter(() -> republishOffers(list),
+                        30, TimeUnit.MILLISECONDS));

I don't understand the reason for the delay, all offers will be prepared to republish recursively, then during the recursion unwind they will all get this call so they delay is likely less than 1ms between each offer republish, but all the calls to republish will happen 30ms later. I think this is not much different to republishing without delay.

The previous version had a random delay, but it was a multiple of the number of orders and 700, so 200 orders ran into 140 seconds republish time and each offer would be spaced out in that time.

-- 
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/4950#pullrequestreview-553594831
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20201216/fca291d5/attachment.htm>


More information about the bisq-github mailing list