Skip to content

Conversation

@Otto-AA
Copy link
Collaborator

@Otto-AA Otto-AA commented Oct 18, 2025

In a project of mine mutmut run now takes half the time (instead of 70s now at 35s). In the case of #433 , executing pytest for some mutants now takes 0.x seconds instead of 10 seconds.

Pytest traceback formatting is apparently slow for large files*, so this is a bottleneck with the mutated source code.

This PR changes it to use the native traceback formatter, which takes practically no time.

I thought about keeping the pytest traceback formatter in debug mode, but given the huge performance issue, I think the default python traceback needs to suffice.

Fixes #433

* I did not investigate, if large files alone are enough. Probably it's about large classes, or stack traces with many variables.

@Otto-AA Otto-AA merged commit b7a81a9 into main Oct 18, 2025
10 checks passed
@CyberiaResurrection
Copy link
Collaborator

CyberiaResurrection commented Oct 20, 2025

As a data point, running max_children = 4, this has sped up the actual mutation part of full-up mutation runs over PyRoute from ~28,600 s (7h 56 m 40 s) to ~19,250s (5h 20m 50s) - a 48% speedup.

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.

Inconsistent mutant status

3 participants