[PATCH] D39738: [clangd] Sort completion results.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 9 13:29:00 PST 2017
sammccall added a comment.
In https://reviews.llvm.org/D39738#921014, @francisco.lopes wrote:
> Sorting got hardcoded? libclang has it optional. If hardcoded, it becomes a performance problem, since some clients may wish to order it themselves with private heuristics.
Is the performance regression here measurable? If clients are re-sorting themselves, then this I think this can only add a small constant factor, and I suspect it's dwarfed by serialization/parsing.
You can gather performance traces with `clangd -trace ~/trace.json`, and view the RPCs in chrome's `chrome://tracing` UI. If you have cases where there's a large difference before/after this patch, I'd definitely like to fix that.
More information about the cfe-commits