forked from OSchip/llvm-project
[clangd] Build Dex index after loading all shards in BackgroundIndex.
Summary: Currently after loadding all shards, we use MemIndex which has poor query performance, we should use Dex. Reviewers: kadircet Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59350 llvm-svn: 356126
This commit is contained in:
parent
d9c174648e
commit
7ce0d6cc33
|
@ -374,7 +374,9 @@ void BackgroundIndex::buildIndex() {
|
|||
// extra index build.
|
||||
reset(
|
||||
IndexedSymbols.buildIndex(IndexType::Heavy, DuplicateHandling::Merge));
|
||||
log("BackgroundIndex: rebuilt symbol index.");
|
||||
log("BackgroundIndex: rebuilt symbol index with estimated memory {0} "
|
||||
"bytes.",
|
||||
estimateMemoryUsage());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -603,8 +605,10 @@ BackgroundIndex::loadShards(std::vector<std::string> ChangedFiles) {
|
|||
}
|
||||
}
|
||||
vlog("Loaded all shards");
|
||||
reset(IndexedSymbols.buildIndex(IndexType::Light, DuplicateHandling::Merge));
|
||||
|
||||
reset(IndexedSymbols.buildIndex(IndexType::Heavy, DuplicateHandling::Merge));
|
||||
vlog("BackgroundIndex: built symbol index with estimated memory {0} "
|
||||
"bytes.",
|
||||
estimateMemoryUsage());
|
||||
return NeedsReIndexing;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue