Skip to content

perf(webf): land flex layout optimization and profiling stack#897

Merged
andycall merged 13 commits intomainfrom
codex/widget-layout-reuse-fix
Mar 29, 2026
Merged

perf(webf): land flex layout optimization and profiling stack#897
andycall merged 13 commits intomainfrom
codex/widget-layout-reuse-fix

Conversation

@andycall
Copy link
Copy Markdown
Member

@andycall andycall commented Mar 29, 2026

Scope
This PR contains the full local stack currently ahead of origin/main.

Included commits

  • feat: add agent skills
  • profiler: add profiler test specs.
  • perf(webf): reduce relayouts in flex fast path
  • fix(webf): restore stable flex layout behavior
  • perf(webf): reduce redundant flex fast-path relayouts
  • perf(webf): narrow mixed flex measurement reuse
  • perf(webf): skip futile early flex run-metrics passes
  • perf(webf): reduce layout constraint overhead
  • perf(webf): optimize layout hotspots
  • perf(webf): narrow flex cache reuse under wrapped layouts
  • perf(webf): optimize flex hotspot profiling
  • fix(webf): avoid debug-only layout reuse checks
  • fix(webf): correct widget layout reuse in flex

Summary
Tooling and profiling

  • add the WebF agent skills set under .agents/skills
  • add Android hotspot profiling test support and runner updates in integration_tests
  • add focused hotspot profiling coverage for layout-heavy cases

Layout and rendering changes

  • optimize hot flex and layout paths across flex.dart, box_model.dart, flow.dart, inline_formatting_context.dart, render_style.dart, length.dart, and related rendering code
  • reduce redundant relayout work in flex measurement and adjustment phases
  • preserve percentage-sensitive flex sizing and row percentage width resolution
  • tighten cache reuse rules under wrapped layouts and auto-sized widget-backed flex items
  • replace unsafe debug-only layout reuse checks with runtime-safe behavior
  • narrow text invalidation so IFC rebuilds do not violate Flutter relayout boundaries

Validation

  • Integration slice run:
    cd /Users/andycall/workspace/webf3/integration_tests && npm run integration -- specs/dom/elements/input.ts specs/dom/react_vite_app.tsx specs/css/css-flexbox/flex-grow.ts specs/css/css-text/line-join.ts
  • Result: 98 specs, 0 failures, 29 pending specs
  • Targeted hotspot profiling support was exercised through the Android OTC hotspot flow during development

Notes

  • this PR is a stacked branch, not a single-fix branch
  • unrelated local files were intentionally left out of the commits

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
use-case Ready Ready Preview, Comment Mar 29, 2026 6:07pm
vue_usecase Ready Ready Preview, Comment Mar 29, 2026 6:07pm

Request Review

@andycall andycall changed the title fix(webf): correct widget layout reuse in flex perf(webf): land flex layout optimization and profiling stack Mar 29, 2026
@andycall andycall merged commit a7d24e1 into main Mar 29, 2026
11 of 13 checks passed
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