Michael137 wrote: > Any word on this? Dead/can't be done? Lowered priority/might revisit later? > Any conclusions/lessons that'd be handy to record for posterity?
The performance implications of the way this was implemented turned out to be quite difficult to overcome. The way we wanted to address the problem of "we didn't fetch the definition for a record type in time the clang needed it" was by making `getDecl` be the thing that also fetches the definition (i.e., completes the record) and getting rid of the `MinimalImport` ASTImporter codepaths. This meant we started completing types much more aggressively. But the ASTImporter was too aggressive in importing types. E.g., it would import the types of function arguments/return types. For Clang analysis that makes sense, but for LLDB that meant parsing a ton of additional debug-info. We tried containing the amount of types we import by, e.g., lazily fetching methods from DWARF only when they're actually called in the expression evaluator, but that wasn't enough. E.g., template arguments etc. would cause the same kind of eager import. So we would need another kind of `ASTImporter` mode that would suit LLDB's needs. By the end, first expression evaluation of a large type like `ASTContext` was ~20 seconds. Which is clearly not feasible. Also things like printing frame status would be affected, because we format types and try to complete them. Since the time this was designed, numerous changes Clang/TypeSystemClang/DWARFASTParserClang have been made. So we decided to revisit this if this starts to become a frequent crash users are seeing. But lately we've seen much fewer crashes in this area. So we decided to lower the priority on this. I would love to ultimately remove the `MinimalImport` stuff, but I'm not sure this is the approach we'll take. https://github.com/llvm/llvm-project/pull/95100 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits