Skip to main content

DedupKey

Type Alias DedupKey 

Source
type DedupKey = (PathBuf, bool, Option<String>);
Expand description

Composite key used to detect duplicate watcher registrations. Two extensions (or the same extension activated twice) frequently register the same (root, recursive, pattern) triple within milliseconds of each other - the typescript-language-features and git extensions are the worst offenders. Without dedup, each registration spawns its own notify::Watcher with its own kqueue/inotify subscription tree, doubling (or worse) FS-event traffic and burning kernel handles.