[PATCH] D124688: [clangd] parse all make_unique-like functions in preamble
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 30 03:44:08 PDT 2022
sammccall added a comment.
Trying this on a few files, this seems like it increases preamble sizes up to 1% or so:
| Before | After
AST.cpp | 42249648 | 42419732
XRefsTests.cpp | 56525116 | 56763768
SelectionDAGISel.cpp | 37546764 | 37668564
internal_s.cc | 59582216 | 60024876
internal_m.cc | 192084984 | 193850560
internal_l.cc | 365811816 | 368841388
I can't see any reason to think that RAM/CPU usage would be out of proportion to this.
A 1% regression here isn't trivial but seems worthwhile for significant functional improvements.
I suppose we can add:
- diagnostics (already with this patch)
- inlay hints
- signature help
WDYT about keeping this behind a flag until these are working?
For diagnostics alone, I'm not sure this is a good tradeoff (otherwise why would we restrict it to variadics? FWIW allowing all function templates to be parsed is +4% to preamble size for internal_l.cc.
I'm less concerned about the effects on the main file, partly because preambles are a bigger performance cliff, and partly because we're probably only regressing in cases where the user really is seeing benefits too.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the cfe-commits