diff --git a/Cargo.toml b/Cargo.toml index 858da1dc460cda2fecbaf2ed94d437bfd25d9644..be78357b2515b12acad808f436cf7359877b5418 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -699,7 +699,6 @@ tree-sitter-rust = "0.24" tree-sitter-typescript = { git = "https://github.com/zed-industries/tree-sitter-typescript", rev = "e2c53597d6a5d9cf7bbe8dccde576fe1e46c5899" } # https://github.com/tree-sitter/tree-sitter-typescript/pull/347 tree-sitter-yaml = { git = "https://github.com/zed-industries/tree-sitter-yaml", rev = "baff0b51c64ef6a1fb1f8390f3ad6015b83ec13a" } tracing = "0.1.40" -tracing-tracy = "0.11.4" unicase = "2.6" unicode-script = "0.5.7" unicode-segmentation = "1.10" diff --git a/crates/zed/Cargo.toml b/crates/zed/Cargo.toml index e304ad7f5cd94c05daab2755cb9e7bed21fe0f8d..a9a8ba87c645e99a68409865a95737e3222c87b3 100644 --- a/crates/zed/Cargo.toml +++ b/crates/zed/Cargo.toml @@ -10,6 +10,9 @@ authors = ["Zed Team "] [lints] workspace = true +[features] +tracy = ["ztracing/tracy"] + [[bin]] name = "zed" path = "src/zed-main.rs" diff --git a/crates/ztracing/Cargo.toml b/crates/ztracing/Cargo.toml index fbc9dc032d2d485f74a15e5fe3b073a7017911fd..c68ac15423cf3a26a8dc855769ba44b9ac29696a 100644 --- a/crates/ztracing/Cargo.toml +++ b/crates/ztracing/Cargo.toml @@ -8,10 +8,13 @@ license = "GPL-3.0-or-later" [lints] workspace = true +[features] +tracy = ["tracing-tracy"] + [dependencies] tracing.workspace = true tracing-subscriber = "0.3.22" -tracing-tracy = { workspace = true, features = ["enable", "ondemand"] } +tracing-tracy = { version = "0.11.4", optional = true, features = ["enable", "ondemand"] } ztracing_macro.workspace = true diff --git a/docs/src/performance.md b/docs/src/performance.md index 4adc38f5eea27de26f1d5818b6787fb78ae1d1ad..544e39e94babbf9c335a847af8819ad5b00494d1 100644 --- a/docs/src/performance.md +++ b/docs/src/performance.md @@ -28,7 +28,7 @@ fn should_appear_in_profile(kitty: Cat) { } ``` -Then either compile Zed with `ZTRACING=1 cargo r --release`. The release build is optional but highly recommended as like every program Zeds performance characteristics change dramatically with optimizations. You do not want to chase slowdowns that do not exist in release. +Then either compile Zed with `ZTRACING=1 cargo r --features tracy --release`. The release build is optional but highly recommended as like every program Zeds performance characteristics change dramatically with optimizations. You do not want to chase slowdowns that do not exist in release. ## One time Setup/Building the profiler: