title: Serilog massive performance hit when enabling Debug log level
body: <p>I'm using Serilog on a .NET Core Service Fabric application.<br>
  We noticed performance issues and after investigation it turns out that Serilog is the culprit.</p>
  
  <p>We log ~2,000 Debug messages and it takes 10+ seconds.<br>
  This is even with only the Console sink configured and set to filter on Information log level only (so not displaying any Debug messages).<br>
  Setting the MinimumLevel to Information makes the same code run &lt;1 second (even with sinks configured).</p>
  
  <p>Our project uses:</p>
  
  <ul>
  <li>netcoreapp2.0</li>
  <li>Serilog NuGet package 2.8.0 (latest)</li>
  </ul>
  
  <p>Is this the kind of performance that is expected from Serilog?</p>
  
  <p><strong>EDIT</strong>: I noticed the same behaviour on another (much) smaller project. That allowed me to isolate the issue: I had a custom enricher that was retrieving the ProcessId. Calling <code>Process.GetCurrentProcess()</code> is incredibly expensive. Doing that for every logging call was what was killing the performance. I stored the process Id in an instance field and the performance soared.</p>