Skip to content
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

Refactor access to psi elements when not needed (follow-up #2901) #2918

Open
paul-dingemans opened this issue Jan 1, 2025 · 0 comments
Open

Comments

@paul-dingemans
Copy link
Collaborator

Got it. If this is non-essential, can we save it for another PR? This one is feeling too large already.

Originally posted by @mgroth0 in #2901 (comment)

Code blocks like below:

                ?.psi
                ?.safeAs<KtFunctionLiteral>()
                ?.bodyExpression
                ?.node

convert an ASTNode to an PsiElement and use Psi constructs. Those constructs can be rewritten to use less Psi functionality and as of that improve performance by reducing the chance of Psi cancellation checking.

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

No branches or pull requests

1 participant