Skip to content

Reuse cached fixed-size widget boxes when descendant layout changes - #102

Merged
trissim merged 3 commits into
mainfrom
perf/native-resize-measurement-20261007
Oct 7, 2026
Merged

trissim merged 3 commits into
mainfrom
perf/native-resize-measurement-20261007

Conversation

@trissim

@trissim trissim commented Oct 7, 2026 •

Copy link
Copy Markdown

The box cache for widgets with fixed or fill sizes was keyed on descendant layout updates, even though the native box calculation reads only the widget's own styles and the supplied size. This change adds a check in _measurement.py that a widget's local styles qualify, and widget.py then keys the cache on the style object and its cache key instead. Widgets with auto sizes, fractional widths that depend on content, or custom style or scalar types keep the old keying. A cache lifetime test is extended.

@trissim
trissim marked this pull request as ready for review October 7, 2026 21:05
Copilot AI balanced review requested due to automatic review settings October 7, 2026 21:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@trissim
trissim merged commit b02d968 into main Oct 7, 2026
0 of 22 checks passed
@trissim trissim changed the title Reuse fixed native boxes across unrelated descendant layout changes Reuse cached fixed-size widget boxes when descendant layout changes Oct 11, 2026
@trissim
trissim deleted the perf/native-resize-measurement-20261007 branch October 11, 2026 20:05
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