zed-industries / zed-industries/zed

Search text content is too slow

Open
#58,905 4 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:performance meta:freeze reach:some users severity:S2 state:needs repro
Dominant language
Rust
Stars
90.6k
Forks
10.7k
Avg merge
1d 12h
Merged PRs (30d)
417

Description

Reproduction steps
  1. shift + command + F to open Global Searchs
  2. 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."
  3. Open VSCode and use "rg j" for search in the same directory.
    rg takes 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: Image

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.