[PATCH] D51475: [clangd] Load YAML static index asynchronously.
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 30 08:06:38 PDT 2018
sammccall added a comment.
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.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D51475
More information about the cfe-commits
mailing list