Skip to content

Redesign "parallel" flag/property #1845

@arturbosch

Description

@arturbosch

Expected Behavior

  1. parallel should control parallel compilation of Kotlin files AND the rule execution.
  2. Not the CommonThreadPool should be used but the specified ExecutorService in ProcessingSettings. This could lead to performance improvements when embedding detekt.
  3. Multi module parallel gradle builds may become faster when using Gradle's --parallel=true and detekt's --parallel=false

Current Behavior

parallel just controls if kotlinc should parse multiple files in parallel or not using Java's list.parallelStream. Rules are always executed in parallel.
This has some downsides:

  1. As mentioned in Flag --parallel seems to do nothing #1513 it is not clear what this flag actually does.
  2. When using Gradle's --parallel many detekt tasks may run in the same time making the CommonThreadPool starve. Runs take like 6-10 seconds on CI for 1.5k lines of code.

Context

Parallel gradle detekt task execution can starve the CommonThreadPool.
Also #1513.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions