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 check one parent for recursive list assignment #218

Merged
merged 1 commit into from
Dec 12, 2020

Conversation

sirbrillig
Copy link
Owner

When looking to see if a list assignment is nested, we use recursion to check each parent list. However, for each level of nested list, we were checking all of the parents. This is unnecessary since the recursion means that each parent will check its own parent, and so on.

This PR only changes the check to only one level of nesting per recursion.

Props to @Levivb for noticing this performance issue!

@sirbrillig sirbrillig mentioned this pull request Dec 12, 2020
@sirbrillig sirbrillig merged commit c6716a9 into 2.10 Dec 12, 2020
@sirbrillig sirbrillig deleted the fix-list-assign-performance branch December 12, 2020 18:28
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.

1 participant