nridge added a comment.

To be able to reason about the impact of various memory usage optimizations, I 
took some baseline measurements.

I used a workload consisting of the LLVM codebase, with the 
compile_commands.json entries filtered to those containing `clang/lib` or 
`clang-tools-extra/clangd`, a total of 1082 source files. (This is what I 
happen to use for local clangd development, but I also think it strikes a good 
balance between being large enough to be representative but not so large that 
taking local measurements is too much of a hassle.)

I measured the memory usage of the background index by performing the `clangd: 
show memory usage` command.

Without this patch (baseline): background_index 560MB (index 372MB, slabs 187MB)
With the patch in its current state: background_index 606MB (index 418MB, slabs 
187MB)

This is an increase of (606 - 560) / 560 = 8.2% over basline, which is 
consistent with previous reports of 5-10%.

My plan going forward is to implement some of the suggested memory usage 
optimizations, and measure their impact.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93829/new/

https://reviews.llvm.org/D93829

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to