From 2b7f1c7f7ce873cf16ca1d154f6885fba0f5a61b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Fri, 23 Oct 2026 05:26:51 +0300 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=20perf:=20tests=20build=20the=20store?= =?UTF-8?q?,=20parser=20and=20password=20hash=20crates=20optimized?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every test opens a fresh store and runs the migrations through turso, and the login tests hash passwords with argon2. Unoptimized, those two dominate the suite. With opt-level 3 for them the summed test time drops from 946 s to 409 s and the workspace run from 80 s to 57 s. A nextest config adds a ci profile that writes JUnit timings. --- .config/nextest.toml | 5 +++++ Cargo.toml | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 .config/nextest.toml diff --git a/.config/nextest.toml b/.config/nextest.toml new file mode 100644 index 0000000..815c339 --- /dev/null +++ b/.config/nextest.toml @@ -0,0 +1,5 @@ +[profile.default] +slow-timeout = { period = "60s" } + +[profile.ci.junit] +path = "junit.xml" diff --git a/Cargo.toml b/Cargo.toml index d18fd27..4a93e2c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -122,6 +122,17 @@ zip = { version = "9.0.3", default-features = false, features = ["deflate"] } # self-update hashes the ~1 GB debug binary at boot; unoptimized sha2 takes ~26 s. opt-level = 3 +[profile.dev.package.turso_core] +# store migrations run through turso_core on every test's fresh store; unoptimized it is slow. +opt-level = 3 +[profile.dev.package.turso_parser] +opt-level = 3 +[profile.dev.package.argon2] +# password hashing runs unoptimized in tests and dominates the login tests. +opt-level = 3 +[profile.dev.package.blake2] +opt-level = 3 + [profile.release] lto = true codegen-units = 1