High memory consumption in Project Search with large codebases
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:
- Clone and open a large project in Zed, e.g. zed.
- Open
Project Search. - Search for a common term like
gpui. - Repeat the last step 5-6 times (just press
Enterrepeatedly) 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:
After 1st search:
After 5th search:
After 7th search:
After closing Project Search pane (RAM drops):
Zed Version and System Specs
Zed: v0.189.0 (Zed Preview) OS: macOS 15.5.0 Memory: 16 GiB Architecture: aarch64
Zed now using half of my RAM too.
Zed: v0.189.0 (Zed Preview)
OS: Fedora 41 Memory: 16 GiB
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.
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!