You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Combine sbt CI steps to reduce JVM startup overhead #4507
.github/workflows/github-action-build.yml runs four separate sbt invocations in the scala job:
sbt scalafmtCheckAll # Lint with scalafmt
sbt clean package # Compile with sbt
sbt "scalafixAll --check" # Lint with scalafix
sbt test # Run backend tests
Each sbt invocation pays the same cold-start cost: launcher boot, project loading, plugin resolution (~19,160 settings), and dependency tree resolve. Local measurement on a warm worktree shows this overhead is ~5–6s per invocation; on the CI runner it is ~12–15s. Across the four invocations, that's ~36–60s of pure repeated startup with no useful work.
Combining the four into a single invocation — sbt 'scalafmtCheckAll; scalafixAll --check; test' — pays the startup cost once. clean package becomes redundant: test already triggers compile and Test/compile via the standard sbt task graph, and a fresh CI runner has no stale target/ to clean.
The non-sbt steps (Create Databases, Set docker-java API version) just need to run before test; they can be moved before the combined sbt step.
Activity
perf(ci): combine sbt lint steps; keep test step separate
perf(ci): combine sbt lint steps; keep test step separate (#4508)
perf(ci): combine sbt lint steps; keep test step separate (apache#4508)