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

Fix slowdown in type inference involving union types #5920

Merged
merged 1 commit into from
Dec 4, 2015

Conversation

ahejlsberg
Copy link
Member

Fixes #5849.

When inferring types, if the source and target are both non-generic object types we don't descend into the types because it we know it won't produce inferences. However, in 1.7 all classes are generic because of the implied this type parameter, so we ended up doing a lot more work. With this PR, we check that the type references actually have explicitly specified type arguments and only descend into the types then.

I have manually verified that performance is back to where it was before.

@mhegazy
Copy link
Contributor

mhegazy commented Dec 4, 2015

👍

1 similar comment
@vladima
Copy link
Contributor

vladima commented Dec 4, 2015

👍

ahejlsberg added a commit that referenced this pull request Dec 4, 2015
Fix slowdown in type inference involving union types
@ahejlsberg ahejlsberg merged commit ee9c4dc into master Dec 4, 2015
@ahejlsberg ahejlsberg deleted the fixUnionTypeInference branch December 4, 2015 01:11
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants