diff --git a/Cargo.toml b/Cargo.toml index 46bbd85..ad8e272 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -233,13 +233,25 @@ ort-tract = "0.4" ndarray = "0.17" [profile.dev] -# Dependencies optimised even in dev builds — wgpu and image decoding are -# unusably slow otherwise, and they rarely need debugging. +# Dev builds are tuned for how fast they *compile*, not for how fast they run. +# Optimisation is a release concern; `[profile.release]` below is where it +# belongs. +# +# This deliberately reverses an earlier choice. Dependencies used to be built +# at `opt-level = 2` here, because wgpu and image decoding are slow without it. +# That is still true, and it is the price: a debug run of the app, and the +# decode- and GPU-heavy tests, are slower than they were. What it buys is that +# nothing has to be optimised before it can be compiled — which is the cost +# paid on every edit, by every worktree, rather than only when something is +# actually run. +# +# If a particular crate turns out to be the one that makes a test unbearable, +# raise it alone rather than restoring the blanket rule: +# +# [profile.dev.package.zune-jpeg] +# opt-level = 2 opt-level = 0 -[profile.dev.package."*"] -opt-level = 2 - [profile.release] lto = "thin" codegen-units = 1