Skip to content

Fix incremental parsing bailout logic #28742

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 1 commit into from
Nov 30, 2018
Merged

Conversation

ahejlsberg
Copy link
Member

Incremental parsing is designed to bail out in certain parsing contexts, such as element lists of array literals. The bailout logic does a lot of redundant work before exiting, however, and this can lead to very poor performance in the language service. While investigating a fix for #28540 I experienced language service delays of up to 30 seconds when typing in a file containing a very large array literal. This PR fixes the issue by optimizing the bailout logic.

There are no tests associated with this PR as we don't have suitable infrastructure, but the fix has been experimentally verified.

@ahejlsberg ahejlsberg merged commit 3d8668c into master Nov 30, 2018
@ahejlsberg ahejlsberg deleted the fixIncrementalParsingBailout branch November 30, 2018 01:11
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.

3 participants