Skip to content

Commit a49b2d5

Browse files
project panel: Make updates asynchronous (zed-industries#38881)
Closes #ISSUE Release Notes: - project panel: Revamped how project panel entries are refreshed, which should lead to a significantly smoother experience when working in large projects. --------- Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
1 parent b5d5759 commit a49b2d5

File tree

10 files changed

+97382
-596
lines changed

10 files changed

+97382
-596
lines changed

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/project/src/project.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5537,17 +5537,6 @@ impl Completion {
55375537
}
55385538
}
55395539

5540-
pub fn sort_worktree_entries(entries: &mut [impl AsRef<Entry>]) {
5541-
entries.sort_by(|entry_a, entry_b| {
5542-
let entry_a = entry_a.as_ref();
5543-
let entry_b = entry_b.as_ref();
5544-
compare_paths(
5545-
(entry_a.path.as_std_path(), entry_a.is_file()),
5546-
(entry_b.path.as_std_path(), entry_b.is_file()),
5547-
)
5548-
});
5549-
}
5550-
55515540
fn proto_to_prompt(level: proto::language_server_prompt_request::Level) -> gpui::PromptLevel {
55525541
match level {
55535542
proto::language_server_prompt_request::Level::Info(_) => gpui::PromptLevel::Info,

crates/project_panel/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ license = "GPL-3.0-or-later"
88
[lints]
99
workspace = true
1010

11+
[[bench]]
12+
name = "sorting"
13+
harness = false
14+
1115
[lib]
1216
path = "src/project_panel.rs"
1317
doctest = false
@@ -32,6 +36,7 @@ serde_json.workspace = true
3236
settings.workspace = true
3337
smallvec.workspace = true
3438
theme.workspace = true
39+
rayon.workspace = true
3540
ui.workspace = true
3641
util.workspace = true
3742
client.workspace = true
@@ -44,6 +49,7 @@ workspace-hack.workspace = true
4449

4550
[dev-dependencies]
4651
client = { workspace = true, features = ["test-support"] }
52+
criterion.workspace = true
4753
editor = { workspace = true, features = ["test-support"] }
4854
gpui = { workspace = true, features = ["test-support"] }
4955
language = { workspace = true, features = ["test-support"] }

0 commit comments

Comments
 (0)