zed icon indicating copy to clipboard operation
zed copied to clipboard

High memory consumption in Project Search with large codebases

Open phyxolog opened this issue 7 months ago • 1 comments

Summary

Massive memory leak during global search in large projects.

Description

Zed guzzles RAM like it's trying to mine Bitcoin when doing repeated global searches in a big project (e.g., zed itself). Searching for a common term (like "gpui") causes memory usage to balloon by ~1GB per search. After just a few searches, you're sitting at 8+ GB RAM usage for doing something that Sublime Text handles in ~250MB, with faster results.

Steps to reproduce:

  1. Clone and open a large project in Zed, e.g. zed.
  2. Open Project Search.
  3. Search for a common term like gpui.
  4. Repeat the last step 5-6 times (just press Enter repeatedly) or search for several other frequent strings.

Expected Behavior: Memory should not increase dramatically between repeated searches.

Actual Behavior: Each search adds ~1GB to Zed’s RAM usage. It goes down only when you close the Project Search pane.

Screenshots

Before Search:

Image

After 1st search:

Image

After 5th search:

Image

After 7th search:

Image

After closing Project Search pane (RAM drops):

Image

Zed Version and System Specs

Zed: v0.189.0 (Zed Preview) OS: macOS 15.5.0 Memory: 16 GiB Architecture: aarch64

phyxolog avatar May 28 '25 22:05 phyxolog

Zed now using half of my RAM too.

Zed: v0.189.0 (Zed Preview)

OS: Fedora 41 Memory: 16 GiB

onlypfachi avatar May 29 '25 09:05 onlypfachi

This issue is still reproducible and quite frustrating. In my view, it’s critical - especially considering your claim that the Zed editor is fast and lightweight on memory.

Image

phyxolog avatar Jul 31 '25 08:07 phyxolog

Hi there! 👋 We're working to clean up our issue tracker by closing older bugs that might not be relevant anymore. If you are able to reproduce this issue in the latest version of Zed, please let us know by commenting on this issue, and it will be kept open. If you can't reproduce it, feel free to close the issue yourself. Otherwise, it will close automatically in 14 days. Thanks for your help!

github-actions[bot] avatar Nov 19 '25 11:11 github-actions[bot]