Skip to content

[SourceKit] Syntax parsing performance improvements #18444

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

Merged
merged 6 commits into from
Aug 3, 2018

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Aug 1, 2018

This PR bundles a bunch of small performance improvements for parsing a syntax tree from a Swift file using SourceKit.

The separate improvements are described in the respective commit messages.

@ahoppen ahoppen requested review from rintaro and nkcsgexi August 1, 2018 17:14
@ahoppen
Copy link
Member Author

ahoppen commented Aug 1, 2018

@swift-ci Please smoke test

Copy link
Member

@rintaro rintaro left a comment

Choose a reason for hiding this comment

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

Looks good.

ahoppen added 6 commits August 2, 2018 14:28
This is faster than invoking getAbsolutePosition which needs to walk the
tree again.
This will allow us to experiment with other serialization formats in the
future more easily.
Heuristics have shown that this prevents several new mallocs and speeds
incremental syntax tree transfer up.
@ahoppen ahoppen force-pushed the performance-improvements branch from a14c459 to b75dd68 Compare August 2, 2018 21:44
@ahoppen
Copy link
Member Author

ahoppen commented Aug 2, 2018

Fixed some merge conflicts.

@swift-ci Please smoke test and merge

@ahoppen
Copy link
Member Author

ahoppen commented Aug 2, 2018

@swift-ci Please smoke test and merge

@swift-ci swift-ci merged commit 701eb4f into swiftlang:master Aug 3, 2018
@ahoppen ahoppen deleted the performance-improvements branch August 22, 2018 15:49
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.

4 participants