- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 387
Description
| Q | A | 
|---|---|
| php-code-coverage version | 12.3.4 | 
| PHP version | 8.3.24 | 
| Driver | Xdebug | 
| PCOV version (if used) | -- | 
| Xdebug version (if used) | 3.4.5 | 
| Installation Method | Composer | 
| Usage Method | PHPUnit | 
| PHPUnit version (if used) | 12.3.7 | 
first of all, i am not really sure, if this is a bugticket for the coverage package or more or less paratest 🤔
paratest serializes CodeCoverage into a file, unserializes this in the main process and uses merge() to combine everything to get the final result.
with phpunit 11 and thus php-code-coverage 11.x - this file on a big codebase is roughly 8M and unserializing takes about 300ms
$ ls
-rw-rw-r--  1 easteregg 8.0M Aug 31 21:26 coverage-serialized-phpunit11.full
$ cat test.php
<?php
require '../vendor/autoload.php';
include 'coverage-serialized-phpunit11.full';
$ time php test.php
php test.php  0.17s user 0.10s system 101% cpu 0.270 totalwhere as the serialized version from version 12 is about 467MB in size and takes 120 seconds (!)
$ ls
-rw-rw-r--  1 easteregg 467M Aug 31 21:28 coverage-serialized-phpunit12.full
$ time php test.php
php test.php  120.24s user 0.32s system 99% cpu 2:00.57 total
that completly breaks paratest, due to loading all 16 threads on a dev machine (or worse, 64 threads on the ci machine) takes ages now 🤔
running the script with xdebug profiler did not show anything too useful, aside from 100% time spent in unserialize 🤔
should i report this to paratest or is this considered an issue applicable here?