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

Restore configure_recurse; use local reconfigure for dynamic parents #299

Merged
merged 9 commits into from
Mar 21, 2022

Conversation

dhardy
Copy link
Collaborator

@dhardy dhardy commented Mar 20, 2022

List, Stack, ComboBox and Splitter widgets now locally reconfigure new children without changing the WidgetId of other children (they use a HashMap for WidgetIdchild_index lookup).

The result (using example/data-list.rs and a hand-controlled stopwatch):

before after
from 0 to 100,000 17.6s 17.8s
from 100,000 to 100,001 13.8s 0.6s

Full-window resize is still required after adjusting the number of widgets, but apparently this is clearly much faster than configuring widgets (a little surprising since configuring is mostly just assigning a WidgetId).

TODO: ComboBox doesn't need to resize the window if the menu is closed, and only needs to resize the menu if open, but it inherits the full-window resize from List. (Low impact optimisation so I'll leave it.)

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