[PATCH] D148088: [RFC][clangd] Move preamble index task to a seperate task

Ivan Murashko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 27 12:57:23 PDT 2023


ivanmurashko added a comment.

In D148088#4302269 <https://reviews.llvm.org/D148088#4302269>, @ilya-biryukov wrote:

> 



> Could you elaborate a bit more on what is being cached with modules and how this patch would affect it?

I hope that I can provide some info here. We are going to use implicit modules to cache preamble i.e. the corresponding modulemap file will contain headers from the preamble. The idea is to provide faster goto-definition functionality that requires AST be built. The modules can be loaded lazily and therefore it can give performance boost up >10x depending on the source file. The problem here is the preamble indexing as soon as it mostly force the module load and kills the performance wins i.e. it will be ~20% instead of 10x. The possible solution is to move the indexing into a separate thread with possible delay for some functionality. Any other ideas will be also interesting here.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148088/new/

https://reviews.llvm.org/D148088



More information about the cfe-commits mailing list