llvm-project/clang/lib/Index
Sam McCall 1abb883a04 [clangd] Don't traverse the AST within uninteresting files during indexing
Summary:
We already skip function bodies from these files while parsing, and drop symbols
found in them. However, traversing their ASTs still takes a substantial amount
of time.

Non-scientific benchmark on my machine:
  background-indexing llvm-project (llvm+clang+clang-tools-extra), wall time
  before: 7:46
  after: 5:13
  change: -33%

Indexer.cpp libclang should be updated too, I'm less familiar with that code,
and it's doing tricky things with the ShouldSkipFunctionBody callback, so it
needs to be done separately.

Reviewers: kadircet

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D80296
2020-05-26 10:27:28 +02:00
..
CMakeLists.txt [clang][Index] Replace CodegenNameGenerator with ASTNameGenerator 2019-09-05 20:33:52 +00:00
CommentToXML.cpp Avoid including FileManager.h from SourceManager.h 2020-03-11 13:53:12 -07:00
FileIndexRecord.cpp Avoid SourceManager.h include in RawCommentList.h, add missing incs 2020-02-27 13:49:40 -08:00
FileIndexRecord.h [clang][index-while-building][NFC] FileIndexRecord - Comments, replace auto with type 2019-02-27 21:48:02 +00:00
IndexBody.cpp [clang][index] Fix a crash for accessing a null field decl. 2020-05-21 09:47:36 +02:00
IndexDecl.cpp [clangd] Don't traverse the AST within uninteresting files during indexing 2020-05-26 10:27:28 +02:00
IndexSymbol.cpp [clang][Index] Introduce a TemplateParm SymbolKind 2020-02-14 13:20:34 +01:00
IndexTypeSourceInfo.cpp [clang][index] Index the injected class name types. 2020-01-22 10:07:54 +01:00
IndexingAction.cpp [clangd] Don't traverse the AST within uninteresting files during indexing 2020-05-26 10:27:28 +02:00
IndexingContext.cpp [clang][Index] Fix the incomplete instantiations in libindex. 2020-02-20 14:42:30 +01:00
IndexingContext.h [clang][Index] Enable indexing of Template Type Parameters behind a flag 2019-02-21 09:52:33 +00:00
SimpleFormatContext.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
USRGeneration.cpp Avoid including FileManager.h from SourceManager.h 2020-03-11 13:53:12 -07:00