Skip to content

A cold just check and just test builds in half the time (closes #623) - #626

Merged
BattermanZ merged 1 commit into
devfrom
feature/623-cold-build
Nov 16, 2026
Merged

BattermanZ merged 1 commit into
devfrom
feature/623-cold-build

Conversation

@BattermanZ

Copy link
Copy Markdown
Member

Summary

-[profile.dev.package."*"]
-opt-level = 2
-debug = 0
+[profile.dev.package]
+"*" = { debug = 0 }
+image = { opt-level = 2 }       # and the rest of the photograph path
+zlib-rs = { opt-level = 2 }     # inflate/deflate
+lopdf = { opt-level = 2 }       # the PDF reader
+scraper = { opt-level = 2 }     # the HTML parser
+rusqlite = { opt-level = 2 }    # SQLite, Argon2, hashing, case folding

Closes #623. Timing tables and the 2026-11-15 clearing are on the issue.

Evidence

Cold, cargo steps of just check + just test, empty target folder, 4 cores:

  • Before: 1,698 s (clippy 549 s, test build 879 s, test run 229 s)
    After: 938 s (clippy 252 s, test build 398 s, test run 250 s)

Warm test run, two runs each: 224 / 226 s before, 235 / 232 s after (+3.7%).

just check and just test pass in full mode.

Merge Danger

Door: two-way

A revert restores the old profile; the next build recompiles the dependencies.

Blast Radius: developer builds

Debug builds only: the release profile and the image are untouched. The first build after merging recompiles every dependency (about 11 minutes cold). A test that leans on a dependency not on the list runs slower; the comment in Cargo.toml says how to add one.

🤖 Generated with Claude Code

https://claude.ai/code/session_013rPDLgbCESE7tSxLeK86m8

The debug profile optimised every dependency, macros and build scripts
included. Only the crates the tests run hard are optimised now: photographs
and WebP, inflate/deflate, the PDF reader, the HTML parser, SQLite, Argon2,
hashing and case folding. From an empty cache the cargo steps of
just check and just test go from 28.3 to 15.6 minutes; the warm test run is
3.7% slower.

Closes #623

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013rPDLgbCESE7tSxLeK86m8
@BattermanZ
BattermanZ merged commit f071987 into dev Nov 16, 2026
1 check passed
@BattermanZ
BattermanZ deleted the feature/623-cold-build branch November 16, 2026 22:00
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