Skip to content

Stop using circularity-unchecked-caching #23808

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 2 commits into from
May 3, 2018

Conversation

weswigham
Copy link
Member

In #18174 this was changed to a caching call - this is unsafe as contextual typing is reentrant with flow control (which is expected), and checkExpressionCached resets the flow loop counter to ensure a consistent cache (preventing the circularity from being detected and correctly handled).

Fortunately, the perf issue that precipitated #18174 seems to have been fixed by other perf fixes, making this (potentially erroneous) caching unneeded (the test now executes in under 200ms).

Fixes #23661.

@weswigham weswigham requested review from sandersn and mhegazy May 1, 2018 20:12
Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

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

Any idea which other change fixed performance? Wasn't there something that flattened or broke up long sequences of binary expressions?

// @target: es5
// @lib: es6
// @strict: true
export interface IValidationError {
Copy link
Member

Choose a reason for hiding this comment

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

for lookup speed, can you add the bug number in a comment?

@weswigham weswigham merged commit 41182c2 into microsoft:master May 3, 2018
@weswigham weswigham deleted the dont-blow-stack branch May 3, 2018 17:44
@microsoft microsoft locked and limited conversation to collaborators Jul 31, 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.

RangeError: Maximum call stack size exceeded
2 participants