Skip to content

secantus-pg: optimise the runtime crates in the debug build; worksteal the backlog step - #2561

Merged
jdrumgoole merged 1 commit into
mainfrom
ci-pg-test-profile
Nov 9, 2026
Merged

jdrumgoole merged 1 commit into
mainfrom
ci-pg-test-profile

Conversation

@jdrumgoole

Copy link
Copy Markdown
Owner

Summary

The PG suites spend their time inside a debug secantusd-pg. This PR optimizes the code the server spends that time in, and leaves the two crates that dominate compile time at debug.

  • Profile change, in crates/secantus-pg/Cargo.toml:
    • third-party crates at opt-level = 2;
    • secantus-core, -storage, -wt, -pgwire, -pgcatalog and -auth at 1;
    • secantus-pgplan and secantus-pg at 0. They are 325k of our 458k lines.
  • Correctness checks unchanged: debug-assertions and overflow-checks stay on everywhere, because a per-package opt-level changes neither.
  • The other half of item 2: the backlog step now uses --dist worksteal, as the suites step already does. Its isolation specs run up to 126 s each.

Measured (2026-11-09, one tree, our crates rebuilt as CI does on a cache hit, -n 4)

profile compile 328 tests¹ backlog shard (2,792)
debug (before) 50 s 292 s 546 s
third-party crates opt-2 48 s 212 s 340 s
+ runtime crates opt-1 (this) 72 s 170 s 252 s
every crate opt-1 207 s 160 s 163 s
every crate opt-2 262 s 148 s 152 s

¹ The corpora, the rule trees and the builtin coverage. Every run passed every test.

Not done yet: splitting the backlog shard into two jobs is held until this PR's numbers are measured on CI. With the faster server, that shard should come down to about the differential shard's length, so a split would barely shorten the run.

First run is slow: the cache key changes with Cargo.toml, so this PR's own first run compiles the third-party crates cold. Runs after the merge use the cache that main saves.

Test plan

🤖 Generated with Claude Code

https://claude.ai/code/session_01QpXX75h9VN88qdKV17kGNS

…l the backlog step

Third-party crates at opt-level 2 and our runtime crates at 1, with the
planner and server crates at 0. Measured: compile 50 s -> 72 s, 328
corpus/rule/builtin tests 292 s -> 170 s, the backlog regression tests
546 s -> 252 s. Debug assertions and overflow checks stay on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QpXX75h9VN88qdKV17kGNS
@jdrumgoole
jdrumgoole merged commit ebdb2f7 into main Nov 9, 2026
13 checks passed
@jdrumgoole
jdrumgoole deleted the ci-pg-test-profile branch November 9, 2026 18:19
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