Skip to content

Coverage Report cache makes PHP report memory usage explode #1009

@Slamdunk

Description

@Slamdunk
Q A
php-code-coverage version 10.1.3
PHP version 8.2
PHPUnit version (if used) 10.3.3

Changes merged in #1005 and released 10.1.3 made Report\PHP unusable as now it always consumes too much memory.

Our coverage.php file went from 29 Mb to 737 Mb, re-processing it with phpcov or any other tool skyrockets the memory used from < 1 Gb to > 4 Gb, with no control over it and, most important, no real benefit for the purposes of re-processing many times the Report\PHP file.

#1005 is good because when you use many Report\*, the Directory is build only once and PHPUnit's report generation is faster, but Report\PHP should serialize the CodeCoverage object without the $this->cachedReport property filled.

I suggest the following improvements:

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions