aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/SourceManager.cpp
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2022-10-05 02:22:38 +0200
committerSam McCall <sam.mccall@gmail.com>2022-10-05 20:55:53 +0200
commit6ea83fc98fd120066c3c42d88c5517ab811152bc (patch)
tree165403ebfad2780bc3ad6277a5247dda5ab00cc4 /clang/lib/Basic/SourceManager.cpp
parent34004d2d03a9a4908254ebbe5e60b6c99c9425d8 (diff)
downloadllvm-6ea83fc98fd120066c3c42d88c5517ab811152bc.zip
llvm-6ea83fc98fd120066c3c42d88c5517ab811152bc.tar.gz
llvm-6ea83fc98fd120066c3c42d88c5517ab811152bc.tar.bz2
[clangd] Don't clone SymbolSlab::Builder arenas when finalizing.
SymbolSlab::Builder has an arena to store strings of owned symbols, and deduplicates them. build() copies all the strings and deduplicates them again! This is potentially useful: we may have overwritten a symbol and rendered some strings unreachable. However in practice this is not the case. When testing on a variety of files in LLVM (e.g. SemaExpr.cpp), the strings for the full preamble index are 3MB and shrink by 0.4% (12KB). For comparison the serializde preamble is >50MB. There are also hundreds of smaller slabs (file sharding) that do not shrink at all. CPU time spent on this is significant (something like 3-5% of buildPreamble). We're better off not bothering. Differential Revision: https://reviews.llvm.org/D135231
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
0 files changed, 0 insertions, 0 deletions