Skip to content

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Aug 27, 2025

see analysis in #1062 (comment) and later comments


with this PR we only run "skipEmptyLines" on files we are interessted in for coverage.

before this PR we normalized all data provided by xdebug, no matter we will need it later or not (based on the Filter)

on my m4 pro this improves performance..

  • by 33% (60ms instead of 90ms) on phpunit 12.x
  • by 29% (47ms instead of 66ms) on phpunit 11.x

when running

php vendor/bin/phpunit -c phpunit12.xml.dist --filter AssertObjectNotEquals --do-not-cache-result

on Yoast/PHPUnit-Polyfills@55860f0


on windows likely even more as we reduce a lot of IO which is especially slow on windows


as this fix improves phpunit 11.x and 12.x in a similar way, there seems to be still other differences need further investigation perf wise

@staabm staabm changed the title Improve performance by skipping empty lines later Improve performance by skipping empty lines after filter has been applied Aug 27, 2025
@sebastianbergmann
Copy link
Owner

This is a draft pull request that cannot be merged, but looks good to me. Do you think this should wait or can I merge it?

@staabm staabm marked this pull request as ready for review August 27, 2025 14:28
@staabm
Copy link
Contributor Author

staabm commented Aug 27, 2025

I think we are good to go now

@sebastianbergmann sebastianbergmann merged commit fb05f1e into sebastianbergmann:11.0 Aug 27, 2025
20 checks passed
@staabm staabm deleted the skip branch August 27, 2025 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants