[PATCH] D52503: [clangd] More precise index memory usage estimate

Eric Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 25 10:14:22 PDT 2018


ioeric added inline comments.


================
Comment at: clang-tools-extra/clangd/index/dex/Dex.cpp:251
   Bytes += InvertedIndex.getMemorySize();
-  for (const auto &P : InvertedIndex)
-    Bytes += P.second.bytes();
+  for (const auto &TokenToPostingList : InvertedIndex)
+    Bytes += TokenToPostingList.first.Data.size() +
----------------
Would `InvertedIndex.getMemorySize()` be a better estimate?


https://reviews.llvm.org/D52503





More information about the cfe-commits mailing list