mirror of
https://github.com/zed-industries/zed.git
synced 2026-11-21 16:10:19 +01:00
21ac361663
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.