[PATCH] D51475: [clangd] Load YAML static index asynchronously.

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 30 08:13:21 PDT 2018


ioeric added a comment.

In https://reviews.llvm.org/D51475#1219291, @sammccall wrote:

> I don't have a strong opinion on async vs sync - startup time is important and we shouldn't block simple AST-based functionality on the index, but this introduces some slightly confusing UX for that speed.
>
> However I think this should be based on https://reviews.llvm.org/D51422 which extracts most of what you need out of MemIndex into the new `SwapIndex`.
>  So static index would just be initialized as an empty SwapIndex, then spawn a thread that loads the YAML and calls SwapIndex::reset.
>  This will get avoid adding nontrivial threading stuff to the main file.


Oops, didn't realize that. That sounds great. Thanks!


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D51475





More information about the cfe-commits mailing list