Skip to content

Conversation

@adrian-prantl
Copy link

commit bc64b4e26e9dc9625c116d9188adcd4b99b23811
Author: Adrian Prantl <aprantl@apple.com>
Date:   Fri Mar 28 17:48:07 2025 -0700

    [lldb] SwiftUserExpression avoid call to ImportType (NFCi)
    
    Currently SwiftASTContext::ImportType was is returning a
    TypeSystemSwiftForExpressions TypeRef if the input is a TypeRef
    type. This makes future type alias resolution very slow because we
    lose the contextual information. By keeping it in the
    TypeSystemSwiftTypeRef returned by the Variable these lookups remain
    local. This can elminiate up to 90% of the time spent evaluating
    expressions in extreme cases.
    
    rdar://145884579

Currently SwiftASTContext::ImportType was is returning a
TypeSystemSwiftForExpressions TypeRef if the input is a TypeRef
type. This makes future type alias resolution very slow because we
lose the contextual information. By keeping it in the
TypeSystemSwiftTypeRef returned by the Variable these lookups remain
local. This can elminiate up to 90% of the time spent evaluating
expressions in extreme cases.

rdar://145884579
(cherry picked from commit bc64b4e)
@adrian-prantl adrian-prantl merged commit d8bea71 into swiftlang:next Mar 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant