[clang-tools-extra] [clang] [clangd] Collect comments from function definitions into the index (PR #67802)
Nathan Ridge via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 1 23:49:03 PST 2024
HighCommander4 wrote:
Ok, I see. (I was confused because nothing in the patch looks at the contents of `Symbol::DocComment` other than an `empty()` check; maybe a `bool HasDocComment` flag is sufficient?)
I'll have a more detailed look when I get a chance, but one suggestion I wanted to make in the meantime: for changes that add new information to the index, it helps to have a sense of how large of an increase to the index's disk and memory footprint they entail. In the past, I've measured this with the LLVM codebase's index as a "test case".
The disk footprint can be measured with a simple `du -hs .cache/clangd/index` or similar. For the memory footprint, we have a `$/memoryUsage` protocol extension that provides this information (the `background_index` entry in particular is of interest).
Perhaps you would be interested in taking some before/after measurements along these lines? Feel free to choose a different codebase than LLVM as the test case, especially if you know of one that uses "doc comments at the definition" as the prevailing style.
https://github.com/llvm/llvm-project/pull/67802
More information about the cfe-commits
mailing list