From f18a40472f913e81bdd33a1f7daf960d9d093dea Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Wed, 8 Apr 2026 17:16:55 +0100 Subject: [PATCH] Compile tree-sitter with opt-level 3 in dev profile (#53385) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tree-sitter query compilation (used to set up language grammars) is a significant bottleneck in test setup. Profiling showed rust_lang() creation taking ~270ms per test in dev builds, with nearly all time spent in tree-sitter's query compiler. With opt-level = 3, this drops to ~63ms locally — a 4x speedup on that step. Across hundreds of tests that create language grammars (vim, editor, collab, etc.), this ought to save substantial CI time. Release Notes: - N/A or Added/Fixed/Improved ... --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 925c2d32215a7b6e376d8e203bee5a27faaf2fed..59f8e265694f060c9f65b30143b79e324de1f08c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -899,6 +899,7 @@ syn = { opt-level = 3 } proc-macro2 = { opt-level = 3 } # proc-macros end +tree-sitter = { opt-level = 3 } taffy = { opt-level = 3 } resvg = { opt-level = 3 } wasmtime = { opt-level = 3 }