Skip to content

Starting a mutation run reads the coverage report and deletes old runs on the EDT #124

Open

Description

@roxblnfk

Description

TestoMutationService.start is called on the EDT (Mutate in the reports row, the editor, the project view and the Coverage view) and, before queueing its background task, does file work there:

  • coveredSources(recipe) parses the run's coverage-xml index.xml (TestoInfectionReports.coveredSourceFiles), which grows with the project;
  • TestoMutationArchive.prune(runDir, KEEP - 1) recursively deletes the oldest mutation runs of that Testo run, each with its stream, text log and HTML report.

On main this is infection/TestoMutationService.kt lines 125–126; #116 keeps both calls in the same place. Not measured; on a large project or a slow disk the click can stall the UI for as long as both take.

Proposed solution

Move both calls into the Task.Backgroundable the method already queues, before the run starts. Nothing on the EDT needs their results: the tab and the run object are created from the recipe and the new run directory alone.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions