Skip to content

[CodeCompletion] Don't generate constraints for parts of a result builder unrelated to the code completion token #42296

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

ahoppen
Copy link
Member

@ahoppen ahoppen commented Apr 11, 2022

This basically resolves all performance-related problems in TurnipsView.swift of the ACHNBrowserUI project in the stress tester, improving average code completion duration from 4 billion instructions to 1 billion instruction in that file.

rdar://90769979 [SR-16056]

@ahoppen
Copy link
Member Author

ahoppen commented Apr 11, 2022

@swift-ci Please SourceKit stress test

@ahoppen ahoppen changed the title WIP: [CodeCompletion] Don't generate constraints for parts of a result builder unrelated to the code completion token [CodeCompletion] Don't generate constraints for parts of a result builder unrelated to the code completion token Apr 13, 2022
@ahoppen ahoppen requested a review from xedin April 13, 2022 06:14
@ahoppen
Copy link
Member Author

ahoppen commented Apr 13, 2022

@swift-ci Please smoke test

@ahoppen ahoppen marked this pull request as ready for review April 13, 2022 06:20
Copy link
Contributor

@xedin xedin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect that you can add it to the loop in the brace statement instead because that's what drives the transformation.

@xedin
Copy link
Contributor

xedin commented Apr 13, 2022

@ahoppen I think you could skip statements entirely (just continue) after moving the check to visitBraceStmt.

@xedin
Copy link
Contributor

xedin commented Apr 13, 2022

Actually no, statements are added to the buildBlock so they’s need a placeholder

@ahoppen
Copy link
Member Author

ahoppen commented Jul 20, 2022

Superseded by #59992

@ahoppen ahoppen closed this Jul 20, 2022
@ahoppen ahoppen deleted the pr/no-constraints-for-unused-result-builder-constructs branch July 20, 2022 13:06
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.

2 participants