From bbb1c617b9198c230d8331dc0ffc2affb01d2e7a Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 18 Aug 2020 17:44:51 +0200 Subject: Speedup tests in dev mode --- Cargo.toml | 47 ++++++++++++++++++++++------------------------- 1 file changed, 22 insertions(+), 25 deletions(-) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index 612e6809f..218581d9d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,37 +2,34 @@ members = [ "crates/*", "xtask/" ] [profile.dev] -# disabling debug info speeds up builds a bunch, +# Disabling debug info speeds up builds a bunch, # and we don't rely on it for debugging that much. debug = 0 +[profile.dev.package] +# These speed up local tests. +rowan.opt-level = 3 +rustc-hash.opt-level = 3 +smol_str.opt-level = 3 +text-size.opt-level = 3 +# This speeds up `cargo xtask dist`. +miniz_oxide.opt-level = 3 + [profile.release] incremental = true -debug = 0 # set this to 1 or 2 to get more useful backtraces in debugger - -# ideally, we would use `build-override` here, but some crates are also -# needed at run-time and we end up compiling them twice -[profile.release.package.proc-macro2] -opt-level = 0 -[profile.release.package.quote] -opt-level = 0 -[profile.release.package.syn] -opt-level = 0 -[profile.release.package.serde_derive] -opt-level = 0 -[profile.release.package.chalk-derive] -opt-level = 0 -[profile.release.package.salsa-macros] -opt-level = 0 -[profile.release.package.tracing-attributes] -opt-level = 0 -[profile.release.package.xtask] -opt-level = 0 +debug = 0 # Set this to 1 or 2 to get more useful backtraces in debugger. -# Gzipping the artifacts is up to 10 times faster with optimizations (`cargo xtask dist`). -# `miniz_oxide` is the direct dependency of `flate2` which does all the heavy lifting -[profile.dev.package.miniz_oxide] -opt-level = 3 +# Ideally, we would use `build-override` here, but some crates are also +# needed at run-time and we end up compiling them twice. +[profile.release.package] +chalk-derive.opt-level = 0 +proc-macro2.opt-level = 0 +quote.opt-level = 0 +salsa-macros.opt-level = 0 +serde_derive.opt-level = 0 +syn.opt-level = 0 +tracing-attributes.opt-level = 0 +xtask.opt-level = 0 [patch.'crates-io'] # rowan = { path = "../rowan" } -- cgit v1.2.3