[Lldb-commits] [PATCH] D136006: [LLDB][NativePDB] Improve ParseDeclsForContext time.

Zequan Wu via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 20 13:55:44 PDT 2022


zequanwu added inline comments.


================
Comment at: lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp:1413-1414
   if (context.isTranslationUnit()) {
-    ParseAllNamespacesPlusChildrenOf(llvm::None);
+    ParseAllTypes();
+    ParseAllFunctionsAndNonLocalVars();
     return;
----------------
labath wrote:
> I have a feeling this is still doing more work than it would be necessary. I haven't checked, but I'd expect that here it should be sufficient to parse only the top level namespace names (not their contents), and create forward declarations for the classes in the global namespace. I suspect this is doing much more than that.
> (Of course, if PDB makes it hard to parse just this information, then it might actually be better to parse everything -- I just don't know)
Yeah, we can do that. 
Update to don't try to complete types at all in `PdbAstBuilder::ParseDeclsForContext`. For a chrome crash report I'm looking at, the time for evaluating a unknown identifier(which will have search scope being a TU) drops from 287s -> 160s.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136006/new/

https://reviews.llvm.org/D136006



More information about the lldb-commits mailing list