From 97b2940fbb1ea207532c618f06e93ed6cbca2146 Mon Sep 17 00:00:00 2001 From: Marcus Kainth Date: Fri, 25 Sep 2026 11:16:22 +0100 Subject: [PATCH] test: build the native crate's suites unoptimised The test profile's opt-level 2 is there for the emulator's fixture and trace suites, which run millions of instructions in Rust. The native crate builds SQL text and its suites spend their time waiting on the server, so it gets opt-level 0 through a package override. Every other crate keeps opt-level 2, the reference emulator included. On a standard runner the native crate's 57 test binaries took 876 CPU seconds to compile at opt-level 2 and 200 at opt-level 0 (cargo --timings, CI run 36121287631). Its non-live suites ran in 0.87 s at opt-level 2 and 1.98 s at opt-level 0 locally. opt-level does not change what safe Rust computes. The generated text is byte-identical anyway: xxh64 of both resident statements, run_statement, demo_statement, the load, level and render plans and the parity queries match at opt-level 2, 1 and 0. --- Cargo.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 64335ea8..f0b402e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -52,3 +52,8 @@ codegen-units = 1 # the tests would otherwise report as a wrong hash. [profile.test] opt-level = 2 + +# The native crate builds SQL text and its suites wait on the server, so +# they build unoptimised. +[profile.test.package.clickdoom-native] +opt-level = 0