MaskRay / ccls

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

High CPU and RAM usage when navigating linux kernel sources #887

Open yangxingwu opened 2 years ago

yangxingwu commented 2 years ago

Observed behavior

ccls uses a extremely high CPU and RAM (nearly about 2GB) and killed by out-of-memory.

Expected behavior

limit the mount of available memory.

Steps to reproduce

  1. git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
  2. cd linux
  3. open a file

System information

stelro commented 2 years ago

I have noticed the same while loading and navigating the llvm project. It looks like ccls executes multiple threads and all of the try to access/write to /tmp/ccls.logs, which spice the CPU percentage to 100%.