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

Only search for nested arrow functions if necessary #342

Merged
merged 3 commits into from
Dec 2, 2024

Conversation

sirbrillig
Copy link
Owner

#334 caused a performance regression. This line was now performing a large scope search for every token when searching for a variable's scope in order to find the scope of nested arrow functions, even if the current variable was not inside an arrow function.

In this diff we prevent searching for the next level of an arrow function if we don't find an arrow function token at all.

Fixes #340

@sirbrillig sirbrillig merged commit eb2b351 into 2.x Dec 2, 2024
60 checks passed
@sirbrillig sirbrillig deleted the improve-nested-arrow-func-search branch December 2, 2024 16:37
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.

Unexpected slowness since v2.11.20
1 participant