<p>I just played around with numbers a bit and there came a surprising result. But please take these results with a pinch of salt (there might be some caching involved).</p>
<ul>
<li>I placed a breakpoint in `Connection.java:763'</li>
<li>used the [Evaluate]-Tool of IntelliJ to execute:</li>
</ul>
<pre><code>long start = System.nanoTime();
for(int i = 0; i < 1000; i++)
        log.debug("size=" + size + "object=" + Utilities.toTruncatedString(proto, 100));
System.err.println((System.nanoTime()-start)/1000);
start = System.nanoTime();
for(int i = 0; i < 1000; i++)
        log.debug("size={}; object={}", size, Utilities.toTruncatedString(proto, 100));
System.err.println((System.nanoTime()-start)/1000);
start = System.nanoTime();
for(int i = 0; i < 1000; i++)
   if (log.isDebugEnabled())
       log.debug("size={}; object={}", size, Utilities.toTruncatedString(proto, 100));
System.err.println((System.nanoTime()-start)/1000);
</code></pre>
<p>and</p>
<pre><code>long start = System.nanoTime();
for(int i = 0; i < 1000; i++)
    log.debug("size=" + size);
System.err.println((System.nanoTime()-start)/1000);
start = System.nanoTime();
for(int i = 0; i < 1000; i++)
    log.debug("size={}", size);
System.err.println((System.nanoTime()-start)/1000);
start = System.nanoTime();
for(int i = 0; i < 1000; i++)
   if (log.isDebugEnabled())
       log.debug("size={}", size);
System.err.println((System.nanoTime()-start)/1000);
</code></pre>
<p>and</p>
<pre><code>long start = System.nanoTime();
for(int i = 0; i < 1000; i++)
    log.debug("classname=" + this.getClass().getSimpleName());
System.err.println((System.nanoTime()-start)/1000);
start = System.nanoTime();
for(int i = 0; i < 1000; i++)
    log.debug("classname={}", this.getClass().getSimpleName());
System.err.println((System.nanoTime()-start)/1000);
start = System.nanoTime();
for(int i = 0; i < 1000; i++)
        if(log.isDebugEnabled())
        log.debug("classname={}", this.getClass().getSimpleName());
System.err.println((System.nanoTime()-start)/1000);
- and here comes the somewhat surprising result:
![Screenshot from 2019-09-06 14-21-31](https://user-images.githubusercontent.com/1070734/64427728-2b41cf00-d0b2-11e9-8f8e-24161dad47eb.png)

</code></pre>

<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/3214?email_source=notifications&email_token=AJFFTNR6EQTVA3ORXDJ4MA3QIJD45A5CNFSM4IUG7WEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6CV5AQ#issuecomment-528834178">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNTDUSLYVC35O6ASTDTQIJD45ANCNFSM4IUG7WEA">mute the thread</a>.<img src="https://github.com/notifications/beacon/AJFFTNQYS34ZXJQCOIR7HFDQIJD45A5CNFSM4IUG7WEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6CV5AQ.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/3214?email_source=notifications\u0026email_token=AJFFTNR6EQTVA3ORXDJ4MA3QIJD45A5CNFSM4IUG7WEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6CV5AQ#issuecomment-528834178",
"url": "https://github.com/bisq-network/bisq/pull/3214?email_source=notifications\u0026email_token=AJFFTNR6EQTVA3ORXDJ4MA3QIJD45A5CNFSM4IUG7WEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6CV5AQ#issuecomment-528834178",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>