pytest icon indicating copy to clipboard operation
pytest copied to clipboard

[self-tests] test time degradation

Open stanislavlevin opened this issue 7 months ago • 3 comments

With Pytest 8.4.0 its tests suite takes significantly more time (compared to Pytest 8.3.5).

pytest's GHA: 8.3.x https://github.com/pytest-dev/pytest/actions/runs/15395204364/job/43314570031

platform linux -- Python 3.12.10, pytest-8.3.6.dev28+g1764fd049, pluggy-1.6.0
===== 3640 passed, 114 skipped, 11 xfailed, 1 xpassed in 335.83s (0:05:35) =====

8.4.x https://github.com/pytest-dev/pytest/actions/runs/15400542935/job/43331856904

platform linux -- Python 3.12.10, pytest-8.4.1.dev3+g7ddd7468e, pluggy-1.6.0
==== 3782 passed, 117 skipped, 11 xfailed, 1 xpassed in 1227.11s (0:20:27) =====

I can see this locally too.

stanislavlevin avatar Jun 03 '25 11:06 stanislavlevin

Bisected to 4b32e7cc33f2972417436fbc86d915944f6c906a Enhancements to unraisable plugin (#12958). The major chunk of the extra time is gc_collect_harder but not all of it.

cc @graingert

bluetech avatar Jun 03 '25 19:06 bluetech

@graingert any chance you can take a look at this? The CI times are really high, with some jobs taking 30+ minutes...

Image

nicoddemus avatar Jun 14 '25 14:06 nicoddemus

Proposed a solution in https://github.com/pytest-dev/pytest/pull/13513.

Image

nicoddemus avatar Jun 14 '25 14:06 nicoddemus