[clangd] Config: Index.Background
authorSam McCall <sam.mccall@gmail.com>
Tue, 14 Jul 2020 13:17:16 +0000 (15:17 +0200)
committerSam McCall <sam.mccall@gmail.com>
Tue, 14 Jul 2020 17:04:11 +0000 (19:04 +0200)
commitdbf486c0de92c76df77c1a1f815cf16533ecbb3a
treef0f08d36705894c09ea573717c495d4c27410bb7
parentbfd643353e6b7ca7b89c0f983ff6a24c36aed276
[clangd] Config: Index.Background

Summary:
We only support Build/Skip for now, but with 'Load' or similar as an
option for future (load existing shards but don't build new ones).

This requires creating the config for each TU on startup. In LLVM, this
is 4000 occurrences for a total of 800ms on my machine.
But together with caching from D83755 it is only 25ms.

Reviewers: kadircet

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

Tags: #clang

Differential Revision: https://reviews.llvm.org/D83768
clang-tools-extra/clangd/Config.h
clang-tools-extra/clangd/ConfigCompile.cpp
clang-tools-extra/clangd/ConfigFragment.h
clang-tools-extra/clangd/ConfigYAML.cpp
clang-tools-extra/clangd/index/Background.cpp
clang-tools-extra/clangd/unittests/BackgroundIndexTests.cpp
clang-tools-extra/clangd/unittests/ConfigCompileTests.cpp