Double speed by using native traceback formatting #447
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In a project of mine
mutmut runnow 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.