pestphp / pestphp/pest

[Bug]: In TIA mode on Windows there's a 1 minute execution overhead, even 100% of tests are replayed and Pest reports "just 2 seconds"

Open
#1,880 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
11.7k
Forks
538
Avg merge
4d 11h
Merged PRs (30d)
8

Description

What Happened

Pest reporting about execution time in TIA mode when many files are changed, but none actually should invoke real test iteration just a replay- do not match actual real execution time (say reported by time command). Action goes on Windows.

How to Reproduce
  1. On Windows OS, change 100 test files slightly with no actual influential changes (like add spaces, comments etc).
  2. Run pest --parallel --tia
  3. Observe 20x-50x times execution penalty, i.e. What Pest reports in "Duration" column and how much Pest process execution actually took (reported with time utility or by other means)

Expected results:
Real execution time should match the one Pest reports. So there's a probable execution overhead on windows when many files are changed, but very tiny amount of them (or none at all) actually leads to a test execution, i,.e. TIA replays most of results.

Sample Repository

No response

Pest Version

5.1.1

PHP Version

8.4.19

Operation System

Windows

Notes

Suggested resolution. I am suspecting that most overhead in windows comes from making many calls to "git show" or similar git commands which fetches actual changes file-by-file. If so, scanning could be done by streaming changes of many objects in one go with git cat-file --batch or similar.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing pest --parallel --tia on Windows after changing many test files, comparing Pest’s Duration with wall-clock time. Investigate the TIA change-detection path and the suspected repeated git show calls, then verify that the reported duration tracks actual execution time when most results are replayed.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, php
Domain
performance, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.