Nerixyz wrote: > When you are about to use a cached formatter, just run the validator function > from that formatter on the candidate VO. If it doesn't pass the validator, > fall back to the full search.
I think for this, it's easier to save the validator per formatter/summary/synthetic, because we need the validator when retrieving from the cache, right? That shouldn't be a big issue, just a refactoring. > You could even make the cache hold the "match string" and a LIST of matching > formatters. If a VO passes the typename string match, then we run through the > list of matching formatters and choose the first one whose validator accepts > this VO. I think in almost all cases, having one entry in the cache is better. Sure, there might be scenarios where you have different types with the same name, but realistically, when you're formatting you're formatting (e.g. at a breakpoint), you'll most likely have one type per name. https://github.com/llvm/llvm-project/pull/143748 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits