[PATCH] D93829: [clangd] Support outgoing calls in call hierarchy

Nathan Ridge via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 11 01:02:50 PDT 2023


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



More information about the cfe-commits mailing list