[bisq-network/bisq] Optimize some hotspots (#3214)

Christoph Sturm notifications at github.com
Fri Sep 6 10:24:16 UTC 2019


christophsturm commented on this pull request.



> @@ -98,7 +98,8 @@
 
     public SettableFuture<Connection> sendMessage(@NotNull NodeAddress peersNodeAddress,
                                                   NetworkEnvelope networkEnvelope) {
-        log.debug("sendMessage: peersNodeAddress=" + peersNodeAddress + "\n\tmessage=" + Utilities.toTruncatedString(networkEnvelope));
+        if (log.isDebugEnabled())
+            log.debug("sendMessage: peersNodeAddress=" + peersNodeAddress + "\n\tmessage=" + Utilities.toTruncatedString(networkEnvelope));

good point but it has no perfomance implications in that case. maybe + is even faster if we already checked for `isDebugEnabled`?

-- 
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/3214#discussion_r321672670
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20190906/ecec9a61/attachment.html>


More information about the bisq-github mailing list