zed-industries / zed-industries/zed
Search text content is too slow
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 90.6k
- Forks
- 10.7k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 417
Description
Reproduction steps
- shift + command + F to open Global Searchs
- After entering the search content and initiating the search, ten minutes pass with no results. The loading icon on the right continues to spin, and the search results area remains displaying "searching."
- Open VSCode and use "rg j" for search in the same directory.
rgtakes 10 seconds, while VSCode takes 20 seconds.
Does Zed's global search have a BUG when there are many files? I have 50+ Node.js projects in my directory, with 30 using pnpm and 20 using npm. Each project's node_modules contains hundreds of megabytes of dependency files. Could it be that a large number of node_modules are being included in the search scope?
Current vs. Expected behavior
Current:
Expectd: Apart from node_modules, there are three places where the text I'm looking for exists.
rg "xxxxxx" -g '!node_modules/' -g '!.git/'
Zed version and system specs
Zed: v1.5.4+stable.300.193b55aa3aa71accf0dcd78709ee164a8ca42d54 (Zed)
OS: macOS 26.0.1
Memory: 16 GiB
Architecture: aarch64
Attach Zed log file
No response
Relevant Zed settings
settings.json
"file_finder": {
"include_ignored": "smart"
},
"search": {
"include_ignored": false
},
"cli_default_open_behavior": "new_window",
"format_on_save": "off",
"edit_predictions": {
"mode": "eager",
"provider": "zed",
},
Relevant Keymap
keymap.json
(for AI issues) Model provider details
No response
If you are using WSL on Windows, what flavor of Linux are you using?
None
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the delay in Global Search with the reported multi-project directory, comparing search.include_ignored behavior and the rg command that excludes node_modules and .git. Trace the search path to determine why ignored dependency files remain costly to scan; done means the search returns the expected three matches without the reported excessive delay.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nodejs, rust
- Domain
- performance, search
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 42/100