Skip to content

[Cherry-pick into next] [lldb] SwiftUserExpression avoid call to ImportType (NFCi) #10381

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

adrian-prantl
Copy link

commit bc64b4e26e9dc9625c116d9188adcd4b99b23811
Author: Adrian Prantl <[email protected]>
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