MaskRay / ccls

C/C++/ObjC language server supporting cross references, hierarchies, completion and semantic highlighting
Apache License 2.0
3.77k stars 259 forks source link

cause too much memory #955

Open cxwx opened 10 months ago

cxwx commented 10 months ago

Observed behavior

截屏2023-12-20 22 02 22

it seem the ccls memory increase time by time. and If I don't close the neovim, it will cause huge memory usage.

Expected behavior

limit the memory usage

Steps to reproduce

System information

BewareMyPower commented 10 months ago

I observed similar errors recently. I met "Your system has run out of application memory?" errors very frequently after upgrading the ccls binary recently.

BewareMyPower commented 10 months ago

As a workaround, I switched to https://github.com/clangd/coc-clangd. You only need to modify .ccls to compile_flags.txt, or just reuse the compile_commands.json from CMake.

ingjieye commented 10 months ago

Try this? https://github.com/MaskRay/ccls/wiki/Customization#cacheretaininmemory

cxwx commented 7 months ago

Try this? https://github.com/MaskRay/ccls/wiki/Customization#cacheretaininmemory

thanks the memory reduce by this method

cxwx commented 6 months ago

when using global ~/.ccls, the memory used is still very large, Is there a way to limit the ccls for global usage