Skip safety rails for widgets with a large number of children
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.5k
- Forks
- 240
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 4
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the safety-rail checks that process children_ids under debug assertions. Examine how child handling is validated and identify where a large-child-count escape hatch would apply. Define and verify the skip threshold and confirm that ordinary small-child cases retain their safety checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100