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

Make BindableProperty add to bindable_properties #4114

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nathanjshaffer
Copy link

@nathanjshaffer nathanjshaffer commented Dec 17, 2024

Make BindableProperty add to bindable_properties during binding instead of waiting till next value change. This fixes a potential issue where a large quantity of BindablePropertys were bound at once would cause a large resource usage if the __set__() method was not called immediately after binding

based on discussion #4101

Make BindableProperty add to bindable_properties during binding instead of waiting till next value change
@zauberzeug zauberzeug deleted a comment from nathanjshaffer Dec 17, 2024
@falkoschindler
Copy link
Contributor

Thanks a lot for this pull request, @nathanjshaffer!

Can you, please, share a reproduction for the specific problem of "large resource usage" when binding many bindable properties at once? I'm still not sure how this might happen.

Your example in #4101 (comment) was missing an initializer def __init__(self) that creates the attribute, e.g., self.bar = ''. This is why the binding couldn't make use of the bindable property.

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.

2 participants