ZIm/crates/assistant/src/slash_command
Piotr Osiewicz 5dc26c261d
util: Use GlobSet in PathMatcher (#13197)
Previously we were using a single globset::Glob in PathMatcher; higher
up the stack, we were then resorting to using a list of PathMatchers.
globset crate exposes a GlobSet type that's better suited for this use
case. In my benchmarks, using a single PathMatcher with GlobSet instead
of a Vec of PathMatchers with Globs is about 3 times faster with the
default 'file_scan_exclusions' values. This slightly improves our
project load time for projects with large # of files, as showcased in
the following videos of loading a project with 100k source files. This
project is *not* a git repository, so it should measure raw overhead on
our side.

Current nightly: 51404d4ea0


https://github.com/zed-industries/zed/assets/24362066/e0aa9f8c-aae6-4348-8d42-d20bd41fcd76

versus this PR:


https://github.com/zed-industries/zed/assets/24362066/408dcab1-cee2-4c9e-a541-a31d14772dd7



Release Notes:

- Improved performance in large worktrees
2024-06-18 16:12:24 +02:00
..
active_command.rs Preserve sections generated by slash commands when reloading a context (#13199) 2024-06-18 14:49:53 +02:00
default_command.rs Preserve sections generated by slash commands when reloading a context (#13199) 2024-06-18 14:49:53 +02:00
diagnostics_command.rs util: Use GlobSet in PathMatcher (#13197) 2024-06-18 16:12:24 +02:00
fetch_command.rs Preserve sections generated by slash commands when reloading a context (#13199) 2024-06-18 14:49:53 +02:00
file_command.rs util: Use GlobSet in PathMatcher (#13197) 2024-06-18 16:12:24 +02:00
now_command.rs Preserve sections generated by slash commands when reloading a context (#13199) 2024-06-18 14:49:53 +02:00
project_command.rs Preserve sections generated by slash commands when reloading a context (#13199) 2024-06-18 14:49:53 +02:00
prompt_command.rs Preserve sections generated by slash commands when reloading a context (#13199) 2024-06-18 14:49:53 +02:00
rustdoc_command.rs Preserve sections generated by slash commands when reloading a context (#13199) 2024-06-18 14:49:53 +02:00
search_command.rs Preserve sections generated by slash commands when reloading a context (#13199) 2024-06-18 14:49:53 +02:00
tabs_command.rs Preserve sections generated by slash commands when reloading a context (#13199) 2024-06-18 14:49:53 +02:00