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

Improve performance of IndexedElementsBinder.assertNoUnboundChildren by not checking all elements #44867

Closed
philwebb opened this issue Mar 25, 2025 · 0 comments
Assignees
Labels
theme: performance Issues related to general performance type: enhancement A general enhancement
Milestone

Comments

@philwebb
Copy link
Member

Currently IndexedElementsBinder checks that there are no unbound children by tracking elements as they are bound. For large property sources, this can be expensive.

If we relax the requirement and instead check a limited number of entries after the final one we can improve performance whilst still catching most errors.

For example, with a window of 10 we would still fail with the following:

list[0]=...
list[1]=...
list[6]=...

but we would now miss:

list[0]=...
list[1]=...
list[10]=...

I think this is probably fine, especially as with YAML configuration lists are unlikely to have missing elements.

@philwebb philwebb self-assigned this Mar 25, 2025
@philwebb philwebb added the theme: performance Issues related to general performance label Mar 25, 2025
@philwebb philwebb added this to the 3.5.0-RC1 milestone Mar 25, 2025
@philwebb philwebb added the type: enhancement A general enhancement label Mar 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: performance Issues related to general performance type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant