Skip to content

build: make the build and the tests faster: options, gains and risks #2269

Backlog

Description

@lagergren

Ways to make the build and the tests faster, locally and on CI, with what each would gain and risk. Measured on CI run 45687900451 on main (2026-11-25) and the build as of 0a8a114.

Today

CI jobs 5 Test jobs: Linux 2024.2 (10 min, of which test 8.5), Linux 2025.3 (11), Linux IU 2026.3 (12), Windows (9), macOS (15). In 490 runs from 2026-11-11 to 11-25, the test step took up to 23 min on macOS. Plus Build Plugin zip and the plugin verifier, each with its own setup and compilation
Tests ~2,500, one class after another in one test JVM per test task (no maxParallelForks, no JUnit parallel execution)
Configuration cache On (gradle.properties). Locally it's reused. On CI it isn't: every job logs "Not saving configuration-cache state, as no encryption key was provided"
Build cache On. CI restores e.g. compileJava, compileKotlin, buildSearchableOptions FROM-CACHE
Task parallelism org.gradle.parallel is off, but LSP4IJ is a single project, so it would change nothing. With the configuration cache, Gradle already runs independent tasks of one project in parallel: in the IU job, test and testJavaScript overlap
Coverage Two tools: Kover (kover { reports { total { xml { onCheck = true } } } }) and JaCoCo (the jacoco plugin, with check depending on jacocoTestReport). Both instrument the test JVMs of all 5 jobs. Codecov uploads only Kover's report.xml, and only from the Linux 2024.2 job

Options

# Change Gain Risk
1 Drop JaCoCo. Nothing uploads its reports. Kover is what Codecov gets Unmeasured. JaCoCo's agent instruments, by default, every class the test JVM loads, IntelliJ's included, so likely noticeable on every job Low. Only the local build/reports/jacoco goes away. Check that nothing else reads it
2 Coverage only in the job that uploads it, e.g. Kover enabled by a property set only in the Linux 2024.2 job The coverage agent's overhead in 4 of the 5 jobs Low. The other jobs no longer produce a coverage report, which nobody uploads anyway
3 Shard the tests across CI jobs, e.g. com.redhat.devtools.lsp4ij.dap.* in a job of its own per platform, through a test filter property Roughly halves the test step's wall time per platform; costs ~1–2 runner minutes of setup per extra job Low to medium. Each shard has its own JVM, which reduces coupling between tests. A test that only passes after another one could show up. Checks and required status names change
4 Configuration cache on CI: cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }} for gradle/actions/setup-gradle Seconds per job (the task graph isn't calculated again) Low, but needs a repository secret. Only helps pushes to main: PRs from forks don't get secrets
5 Skip searchable options in the Test jobs (buildSearchableOptions starts an IDE when it isn't FROM-CACHE; check builds the plugin) Minutes when the cache misses, as after a change to settings or plugin.xml; nothing otherwise Low for the Test jobs. Keep them in Build Plugin zip and releases
6 Forked test JVMs (maxParallelForks = 2) Potentially the largest: the test step is most of each job High. All forks would share the test sandbox (IntelliJ's system and config directories, indexes, locks), files under the user's home (installer tests), and any fixed ports. Each IntelliJ test JVM needs ~1.5–2 GB; Linux runners have 4 vCPUs and 16 GB, macOS runners 3 vCPUs. Needs a sandbox per fork, which the IntelliJ Platform Gradle Plugin configures per test task, not per fork. Process-wide singletons such as MockLanguageServer.INSTANCE are per JVM, so they are fine
7 JUnit parallel execution inside one JVM Large in theory Very high; not recommended. IntelliJ's test fixtures, the EDT and static singletons such as MockLanguageServer.INSTANCE aren't made for concurrent tests
8 Local runs: test --rerun instead of --rerun-tasks --no-build-cache --rerun reruns only the test task; --rerun-tasks also recompiles and prepares the sandbox again, ~1–2 min per run None. A contributor tip for the developer guide
9 One setup for Build Plugin zip and the plugin verifier, or reuse the CI job's compiled plugin Runner minutes, not wall time: the workflows run side by side Low to medium. Workflow restructuring; required checks may change

Suggested order

  1. Measure 1 and 2 with one CI run on a branch without JaCoCo and without coverage in 4 jobs, and compare with the times above.
  2. If they help, keep them (low risk), then consider 3 for wall time.
  3. Leave 6 for later, only with a sandbox per fork and a check that installer tests don't share files under the user's home. Don't do 7.

Activity

  1. added
    enhancement
    on Nov 25, 2026
  2. 7 remaining items

  3. added this to the Backlog milestone on Nov 30, 2026
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

    buildenhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions