From 07b26bfedda5d0b0382adde0454c6ca200cbb4eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Sun, 30 Aug 2026 04:26:58 +0300 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=20perf(build):=20dependencies=20are?= =?UTF-8?q?=20compiled=20optimised=20in=20dev=20too?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A dev build runs the same spreadsheet reader a release build does, and an unoptimised quick-xml walks a wide sheet about twenty times slower: one page of the 1,200-column book took 2.1s on `cargo run` against 94ms built for release. Dependencies now build at opt-level 3 in the dev profile — the workspace's own crates stay unoptimised, so an edit still rebuilds in a second, and the same page now takes 410ms. Costs one full rebuild of the dependency tree the next time dev is built. --- Cargo.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index ab6bdc5..b1f45f5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,6 +25,14 @@ chacha20poly1305 = "0.10.1" base64 = "0.22.1" toml = "1" +# A dev build runs the same spreadsheet reader a release build does, and an +# unoptimised quick-xml walks a wide sheet about twenty times slower — a page +# of a 1,200-column book took two seconds to open on `cargo run`. Dependencies +# are compiled optimised even in dev; the workspace's own crates stay +# unoptimised, so an edit still rebuilds in a second. +[profile.dev.package."*"] +opt-level = 3 + [profile.release] codegen-units = 1 lto = true