-
Notifications
You must be signed in to change notification settings - Fork 115
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
Excessive memory usage with clangd 19 #712
Comments
Are you able to share a code example on which a difference in memory usage can be observed? |
I get this behavior even with a nearly empty project, although to a lesser extent: v19: ~150MB on startup, increases by ~1MB if I close and reopen 'main.cpp' |
I have same for:
clangd command line parameter "--malloc-trim" helps to drop from 8000MB to 1600MB after changing file in IDE and after 1 minute. |
In my case, switching to tcmalloc for clangd decreased memory consumption about 30% Also I've found that clangd creates additional thread for each opened vscode tab and this thread does not honor "-j" command line parameter. So, if there are a lot of tabs, and some common header file is changed, then clangd consumes a lot of memory (because is not honor?). Related clice-project/clice#5 |
Clangd-19's memory usage is at about 1GB on startup and steadily grows with each file opened, eventually reaching 8GB before crashing.
In my tests, version 18.1.8 peaks around 1GB, and typically idles at about 500MB.
Logs
clangdlog.txt
System information
clangd version: 19.1.3
clangd extension version: 0.1.29
Operating system: Windows 10
The text was updated successfully, but these errors were encountered: