Files
zed/crates
John Tur 351ec9cb4f Optimize workspace/didChangeWatchedFiles handler (#49778)
Previously, `didChangeWatchedFiles` registrations triggered a rebuild of
a single `GlobSet` containing all file watch patterns for the language
server. This means that, each time `didChangeWatchedFiles` is
registered, the work it takes to construct the `GlobSet` increases. This
quadratic blowup caused massive lag with language servers which register
thousands of watched files (like Roslyn).

Instead, create one `GlobSet` per registration and try matching them
one-by-one each time a file watcher event is raised.

---

Before you mark this PR as ready for review, make sure that you have:
- [X] Added a solid test coverage and/or screenshots from doing manual
testing
- [X] Done a self-review taking into account security and performance
aspects

Release Notes:

- Optimized performance for language servers which register many
file-watching notifications.
2026-02-21 04:29:42 +00:00
..
2026-02-18 14:20:30 +01:00
2026-02-12 01:06:23 +00:00
2026-02-12 01:06:23 +00:00
2026-02-19 19:15:59 -05:00
2026-02-12 01:06:23 +00:00
2026-02-12 01:06:23 +00:00
2026-02-12 01:06:23 +00:00
2025-11-07 11:36:05 +00:00