windows: Fix performance issues after trashing or deleting a folder (#27498)
Closes #25247 Since the upstream `Notify` repo hasn't merged the related PR yet, this is basically a temporary patch to work around it. Release Notes: - N/A
This commit is contained in:
parent
9a2dfa687d
commit
d232150d67
3 changed files with 36 additions and 52 deletions
83
Cargo.lock
generated
83
Cargo.lock
generated
|
@ -5228,7 +5228,7 @@ dependencies = [
|
||||||
"ignore",
|
"ignore",
|
||||||
"libc",
|
"libc",
|
||||||
"log",
|
"log",
|
||||||
"notify 6.1.1",
|
"notify 8.0.0 (git+https://github.com/zed-industries/notify.git?rev=bbb9ea5ae52b253e095737847e367c30653a2e96)",
|
||||||
"objc",
|
"objc",
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
"paths",
|
"paths",
|
||||||
|
@ -6833,17 +6833,6 @@ dependencies = [
|
||||||
"zeta",
|
"zeta",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "inotify"
|
|
||||||
version = "0.9.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff"
|
|
||||||
dependencies = [
|
|
||||||
"bitflags 1.3.2",
|
|
||||||
"inotify-sys",
|
|
||||||
"libc",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "inotify"
|
name = "inotify"
|
||||||
version = "0.11.0"
|
version = "0.11.0"
|
||||||
|
@ -6949,7 +6938,7 @@ dependencies = [
|
||||||
"fnv",
|
"fnv",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"libc",
|
"libc",
|
||||||
"mio 1.0.3",
|
"mio",
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
"serde",
|
"serde",
|
||||||
"tempfile",
|
"tempfile",
|
||||||
|
@ -8151,7 +8140,7 @@ dependencies = [
|
||||||
"ignore",
|
"ignore",
|
||||||
"log",
|
"log",
|
||||||
"memchr",
|
"memchr",
|
||||||
"notify 8.0.0",
|
"notify 8.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"notify-debouncer-mini",
|
"notify-debouncer-mini",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"opener",
|
"opener",
|
||||||
|
@ -8300,18 +8289,6 @@ version = "0.5.9"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e53debba6bda7a793e5f99b8dacf19e626084f525f7829104ba9898f367d85ff"
|
checksum = "e53debba6bda7a793e5f99b8dacf19e626084f525f7829104ba9898f367d85ff"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "mio"
|
|
||||||
version = "0.8.11"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c"
|
|
||||||
dependencies = [
|
|
||||||
"libc",
|
|
||||||
"log",
|
|
||||||
"wasi 0.11.0+wasi-snapshot-preview1",
|
|
||||||
"windows-sys 0.48.0",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mio"
|
name = "mio"
|
||||||
version = "1.0.3"
|
version = "1.0.3"
|
||||||
|
@ -8589,25 +8566,6 @@ dependencies = [
|
||||||
"workspace",
|
"workspace",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "notify"
|
|
||||||
version = "6.1.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d"
|
|
||||||
dependencies = [
|
|
||||||
"bitflags 2.8.0",
|
|
||||||
"crossbeam-channel",
|
|
||||||
"filetime",
|
|
||||||
"fsevent-sys 4.1.0",
|
|
||||||
"inotify 0.9.6",
|
|
||||||
"kqueue",
|
|
||||||
"libc",
|
|
||||||
"log",
|
|
||||||
"mio 0.8.11",
|
|
||||||
"walkdir",
|
|
||||||
"windows-sys 0.48.0",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "notify"
|
name = "notify"
|
||||||
version = "8.0.0"
|
version = "8.0.0"
|
||||||
|
@ -8617,12 +8575,30 @@ dependencies = [
|
||||||
"bitflags 2.8.0",
|
"bitflags 2.8.0",
|
||||||
"filetime",
|
"filetime",
|
||||||
"fsevent-sys 4.1.0",
|
"fsevent-sys 4.1.0",
|
||||||
"inotify 0.11.0",
|
"inotify",
|
||||||
"kqueue",
|
"kqueue",
|
||||||
"libc",
|
"libc",
|
||||||
"log",
|
"log",
|
||||||
"mio 1.0.3",
|
"mio",
|
||||||
"notify-types",
|
"notify-types 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"walkdir",
|
||||||
|
"windows-sys 0.59.0",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "notify"
|
||||||
|
version = "8.0.0"
|
||||||
|
source = "git+https://github.com/zed-industries/notify.git?rev=bbb9ea5ae52b253e095737847e367c30653a2e96#bbb9ea5ae52b253e095737847e367c30653a2e96"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags 2.8.0",
|
||||||
|
"filetime",
|
||||||
|
"fsevent-sys 4.1.0",
|
||||||
|
"inotify",
|
||||||
|
"kqueue",
|
||||||
|
"libc",
|
||||||
|
"log",
|
||||||
|
"mio",
|
||||||
|
"notify-types 2.0.0 (git+https://github.com/zed-industries/notify.git?rev=bbb9ea5ae52b253e095737847e367c30653a2e96)",
|
||||||
"walkdir",
|
"walkdir",
|
||||||
"windows-sys 0.59.0",
|
"windows-sys 0.59.0",
|
||||||
]
|
]
|
||||||
|
@ -8634,8 +8610,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a689eb4262184d9a1727f9087cd03883ea716682ab03ed24efec57d7716dccb8"
|
checksum = "a689eb4262184d9a1727f9087cd03883ea716682ab03ed24efec57d7716dccb8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"notify 8.0.0",
|
"notify 8.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"notify-types",
|
"notify-types 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"tempfile",
|
"tempfile",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -8645,6 +8621,11 @@ version = "2.0.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5e0826a989adedc2a244799e823aece04662b66609d96af8dff7ac6df9a8925d"
|
checksum = "5e0826a989adedc2a244799e823aece04662b66609d96af8dff7ac6df9a8925d"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "notify-types"
|
||||||
|
version = "2.0.0"
|
||||||
|
source = "git+https://github.com/zed-industries/notify.git?rev=bbb9ea5ae52b253e095737847e367c30653a2e96#bbb9ea5ae52b253e095737847e367c30653a2e96"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ntapi"
|
name = "ntapi"
|
||||||
version = "0.4.1"
|
version = "0.4.1"
|
||||||
|
@ -14241,7 +14222,7 @@ dependencies = [
|
||||||
"backtrace",
|
"backtrace",
|
||||||
"bytes 1.10.1",
|
"bytes 1.10.1",
|
||||||
"libc",
|
"libc",
|
||||||
"mio 1.0.3",
|
"mio",
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
"signal-hook-registry",
|
"signal-hook-registry",
|
||||||
|
|
|
@ -40,7 +40,7 @@ objc = "0.2"
|
||||||
cocoa = "0.26"
|
cocoa = "0.26"
|
||||||
|
|
||||||
[target.'cfg(not(target_os = "macos"))'.dependencies]
|
[target.'cfg(not(target_os = "macos"))'.dependencies]
|
||||||
notify = "6.1.1"
|
notify = { git = "https://github.com/zed-industries/notify.git", rev = "bbb9ea5ae52b253e095737847e367c30653a2e96" }
|
||||||
|
|
||||||
[target.'cfg(target_os = "windows")'.dependencies]
|
[target.'cfg(target_os = "windows")'.dependencies]
|
||||||
windows.workspace = true
|
windows.workspace = true
|
||||||
|
|
|
@ -38,6 +38,9 @@ impl Watcher for FsWatcher {
|
||||||
EventKind::Create(_) => Some(PathEventKind::Created),
|
EventKind::Create(_) => Some(PathEventKind::Created),
|
||||||
EventKind::Modify(_) => Some(PathEventKind::Changed),
|
EventKind::Modify(_) => Some(PathEventKind::Changed),
|
||||||
EventKind::Remove(_) => Some(PathEventKind::Removed),
|
EventKind::Remove(_) => Some(PathEventKind::Removed),
|
||||||
|
// Adding this fix a weird bug on Linux after upgrading notify
|
||||||
|
// https://github.com/zed-industries/zed/actions/runs/14085230504/job/39449448832
|
||||||
|
EventKind::Access(_) => return,
|
||||||
_ => None,
|
_ => None,
|
||||||
};
|
};
|
||||||
let mut path_events = event
|
let mut path_events = event
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue