Skip to content

Reduce the coordinator's per-mutant overhead - #573

Open
sknigh wants to merge 1 commit into
boxed:mainfrom
sknigh:perf/coordinator-overhead
Open

sknigh wants to merge 1 commit into
boxed:mainfrom
sknigh:perf/coordinator-overhead

Conversation

@sknigh

@sknigh sknigh commented Sep 8, 2026

Copy link
Copy Markdown
  1. Running totals for the status line. print_stats recounted every mutant's verdict on every loop iteration, quadratic over a run and paid again on a rerun just to skip cached results. ProgressCounter computes the totals once and adjusts them per verdict.

  2. Batched meta writes. Every finished mutant rewrote its whole .meta file. register_result now marks the file dirty; the loop flushes dirty files every two seconds and at the end, which can combine updates from multiple mutants. A SIGTERM will flush the last batch, but a crash loses at most two seconds of verdicts that the next run will have to re-compute.

  3. Precompiled tree. The single-process stats run compiled every generated file on first import. precompile_mutants byte-compiles the mutated source paths with a worker pool right after generation; up-to-date .pyc files are skipped.

1. Running totals for the status line. print_stats recounted every
   mutant's verdict on every loop iteration, quadratic over a run and
   paid again on a rerun just to skip cached results. ProgressCounter
   computes the totals once and adjusts them per verdict.

2. Batched meta writes. Every finished mutant rewrote its whole .meta
   file. register_result now marks the file dirty; the loop flushes
   dirty files every two seconds and at the end, also on interrupt. A
   crash loses at most two seconds of verdicts, which are re-tested.

3. Precompiled tree. The single-process stats run compiled every
   generated file on first import. precompile_mutants byte-compiles the
   mutated source paths with a worker pool right after generation;
   up-to-date .pyc files are skipped.
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.

1 participant