-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
RFC: Add caches to avoid recomputing MinSize multiple times #4681
Conversation
7de68d1
to
0fd0cf5
Compare
Hmm, it might be a bit out there - but perhaps this does not have to be on the widget at all. Looking at the bigger picture the tree walk leans heavily on MinSize but does not know if it is changed - perhaps we could even save the tree walk if we are able to determine that no minimum has changed between walks? |
Interesting thoughts. I will try to get it to work and get all the tests to pass first using this solution and then I can looking into how the other cache works. FYI: I think using the cache for container might be entirely flawed? We don't want to have to refresh the whole container when a widget changes, right? |
Continuing this in #4827 instead |
Description:
This is a request for comments about adding an automatic and built-in cache for MinSize values in BaseWidget and containers. This avoids having to recalculate the size by walking the entire tree of objects each time. It does incur a slight change of behaviours for widgets that overwrite the
MinSize()
method and use the size given from the BaseWidget to add or subtract to. I have updated all widgets to make sure that the renderer defines the needed MinSize and as such all widgets are updated to use the cache.Checklist:
Where applicable: