[clang-tools-extra] r356126 - [clangd] Build Dex index after loading all shards in BackgroundIndex.
Haojian Wu via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 14 02:57:10 PDT 2019
Author: hokein
Date: Thu Mar 14 02:57:10 2019
New Revision: 356126
URL: http://llvm.org/viewvc/llvm-project?rev=356126&view=rev
Log:
[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
Modified:
clang-tools-extra/trunk/clangd/index/Background.cpp
Modified: clang-tools-extra/trunk/clangd/index/Background.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clangd/index/Background.cpp?rev=356126&r1=356125&r2=356126&view=diff
==============================================================================
--- clang-tools-extra/trunk/clangd/index/Background.cpp (original)
+++ clang-tools-extra/trunk/clangd/index/Background.cpp Thu Mar 14 02:57:10 2019
@@ -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<
}
}
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;
}
More information about the cfe-commits
mailing list