Why is doing KernelTests Code Coverage so slow? In my D8 project I have Unit and Kernel tests. 
Running them (via CLI) without "--coverage-html" is fine. 
Unit tests in general are ~300ms, Kernels are around 3s (of course based on the size of dependencies and the amount of the test cases). 

But when I also want to have code coverage Unit tests are fast as usual but Kernel tests are incredible slow (10-20 minutes).

I started to use filters and whitelisting in the phpunit config file, but that affects only the result (the generated coverage files) but not the speed, which makes the impression that PHPUnit also loops through the Kernel Dependencies (such as core files). 

Has anyone met this problem before? What can cause it?

Here is my filtering options:

&lt;filter&gt;
    &lt;whitelist&gt;
        &lt;directory suffix=".php"&gt;./web/modules/custom/test_module&lt;/directory&gt;
    &lt;/whitelist&gt;
&lt;/filter&gt;
A kernel tests actually installs Drupal (in-memory only, but still), that means it runs thounsands and thousands of lines of code.

You can't really do anything to change that, xdebug (I guess you use that) would actually have to support a native whitelist to keep the overhead minimal, but that would in turn also result in overhead.