zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
39.22k stars 2.03k forks source link

Possible memory leak #13544

Open bottlenecked opened 5 days ago

bottlenecked commented 5 days ago

Check for existing issues

Describe the bug / provide steps to reproduce it

I regularly have 3-4 zed windows open of different projects, but this is the first time I saw the "Your system has run out of application memory" dialog. It seems zed was using 89GB of memory at that point.

There are a few other open tickets that match 'memory leak' right now, but only this one https://github.com/zed-industries/zed/issues/13190 is in the same ballpark. It could be the same as I did have a python project open at the time, along with 2 elixir ones, but I never opened a .toml file for editing in the last couple of days so I'm not sure.

I got a screenshot and a memory dump, not sure if it's going to be of any help though

Screenshot 2024-06-26 at 3 17 30 PM zed_sample_89GB.txt

Environment

Zed: v0.140.5 (Zed) OS: macOS 14.5.0 Memory: 16 GiB Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

Zed.log


notpeter commented 4 days ago

I know this doesn't help now, but in the future in Activity Monitor you can toggle to see 'All Processes Hierarchically' which might help identify a particular subprocess which is ballooning memory.

image image
bottlenecked commented 11 hours ago

So it happened again just now and I expanded the process tree, nothing that immediately jumps out though

image

My open projects are an elixir one and a ruby on rails one that's rather large