Skip to content

Memory hogger on Mac M1 #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
singhsaubhik opened this issue Mar 3, 2022 · 10 comments
Closed

Memory hogger on Mac M1 #77

singhsaubhik opened this issue Mar 3, 2022 · 10 comments
Labels
A-editor Area: editor, modal editing C-perf Category: performance

Comments

@singhsaubhik
Copy link

This application very fast starts cosuming a large chunk of RAM, attaching screenshot

System Specification
Macbook Air (M1 2020)
Chip Apple M1
Memory 16 GB

Screenshot
image

@oleid
Copy link

oleid commented Mar 3, 2022

Would you describe what you are doing after starting the application? Anything particular like opening a rust project or something along the line?

@singhsaubhik
Copy link
Author

Would you describe what you are doing after starting the application? Anything particular like opening a rust project or something along the line?

I was playing around, opened a small rust project and typing some code realized some lag and frame drops. When analysed using Activity Monitor saw it was consuming more than 5gb of Ram.

@ghishadow
Copy link
Contributor

One thing i noticed is if you installed rust plugin, then rust analyzer takes huge memory rust-lang/rust-analyzer#5728 rust-lang/rust-analyzer#1252 rust-lang/rust-analyzer#9470 rust-lang/rust-analyzer#11325 while indexing but after that memory usage get better

@hasali19
Copy link
Contributor

hasali19 commented Mar 4, 2022

I'm also getting very high memory usage on Windows when typing (without rust analyzer). I can consistently reproduce this by opening a file and holding down a key on the keyboard to fill up the editor. Once a line is full, move to the next line and keep entering text. After a few lines, the memory usage will suddenly start to increase significantly and keep increasing linearly as the editor fills. Interestingly, the memory only increases while the text fits on the screen - if it starts scrolling horizontally then it stops increasing, but starts again when I move to the next line.

@bugadani
Copy link
Contributor

Looks like typing consumes an extreme amount of memory (just holding down "s" for a few seconds got me ~100MB extra), but deleting the added text frees up everything.

@bugadani bugadani added C-perf Category: performance A-editor Area: editor, modal editing labels Apr 3, 2022
@arcoleo
Copy link

arcoleo commented May 17, 2022

I get similar behavior on a first generation Mac M1 with 16G ram. I created a folder with a single file in it, test1.txt. The contents are Testing Lapce.

Lapce takes 1.45G. I add the line Hello, world! and memory climbs to 2G and slowly creeps up from there.

@zyxkad
Copy link

zyxkad commented Sep 9, 2022

I am on Apple M1 Pro, MacOS 12.1.
This issue is not happen, Lapce is using 300~400MB

@panekj
Copy link
Collaborator

panekj commented Sep 23, 2022

Memory now should slowly raise based on the actual usage (typing, etc.)
Tested on M1

@panekj panekj closed this as completed Sep 23, 2022
@jianshu93
Copy link

I also have about 300-400M memory usage after installing rust code analyzer. However I think this is still much larger than others, for example visual studio code. The bad thing is when you open a second window, memory requirement doubles, which is very strange to me because it is still a rust project, why consuming double memory?

Thanks,

Jianshu

@jayzhan211
Copy link

jayzhan211 commented Jun 20, 2023

Screenshot 2023-06-20 at 21 32 46

Starting RA server consume tons of memory, they are still there even I force quit VSCode. The memory usage is crazy. I did not have the same issue on another small project, current opened project has many crate dependencies, is it because there are so many crates used and they are pre-indexing so they consume so much ram? Is there an option to lazily index the necessary crate only if I need it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-editor Area: editor, modal editing C-perf Category: performance
Projects
None yet
Development

No branches or pull requests

10 participants