diff --git a/Cargo.lock b/Cargo.lock index 1ee239c3740bb0fba40f81b9cdae77a46d62d535..947d90338afea01f0096585c2b1fb74ac907bbf1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -21233,6 +21233,7 @@ dependencies = [ "project_symbols", "prompt_store", "proto", + "rayon", "recent_projects", "release_channel", "remote", diff --git a/crates/zed/Cargo.toml b/crates/zed/Cargo.toml index 9f6196c1482bcff2db9b7812dfb75b1471fec273..ebb3d8beb321cb6ee42cec84ddf7f456672a0265 100644 --- a/crates/zed/Cargo.toml +++ b/crates/zed/Cargo.toml @@ -73,6 +73,7 @@ gpui = { workspace = true, features = [ "windows-manifest", ] } gpui_tokio.workspace = true +rayon.workspace = true edit_prediction_button.workspace = true http_client.workspace = true diff --git a/crates/zed/src/main.rs b/crates/zed/src/main.rs index b873a58d3b61338b25c5908c2f87b62acb95d6f6..18903d888090bbc1fa0955d46417486a3f9fe13b 100644 --- a/crates/zed/src/main.rs +++ b/crates/zed/src/main.rs @@ -257,6 +257,13 @@ pub fn main() { return; } + rayon::ThreadPoolBuilder::new() + .num_threads(4) + .stack_size(10 * 1024 * 1024) + .thread_name(|ix| format!("RayonWorker{}", ix)) + .build_global() + .unwrap(); + log::info!( "========== starting zed version {}, sha {} ==========", app_version,