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

Skip safety rails for widgets with a large number of children #685

Open
PoignardAzur opened this issue Oct 17, 2024 · 0 comments
Open

Skip safety rails for widgets with a large number of children #685

PoignardAzur opened this issue Oct 17, 2024 · 0 comments

Comments

@PoignardAzur
Copy link
Contributor

Safety rails are a debug feature that panic early if they detect that a widget was implement incorrectly. They only run with debug_assertions, and overall documentation is careful to never guarantee that they'll run. They're here as an additional help for users.

When we're running with debug assertions, we assume that user doesn't care too much about performance and a small overhead is fine. However, safety rails can add large (think O(N²)) overhead to passes when widgets have a very large number of children.

We should add an automatic escape hatch for cases where children_ids is large, so we can skip children in those cases. We can assume that if MyCustomWidget has a bug in child handling, the will probably show up with a small number of children too.

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

No branches or pull requests

1 participant