Skip to content

fix: update Taffy to 0.14.0 - #57

Merged
hyfdev merged 3 commits into
mainfrom
agent/update-taffy-main
Aug 25, 2026
Merged

fix: update Taffy to 0.14.0#57
hyfdev merged 3 commits into
mainfrom
agent/update-taffy-main

Conversation

@hyfdev

@hyfdev hyfdev commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Both TaffyJS runtimes use Taffy 0.14.0, which prevents deeply nested flex columns from repeating the same layout work at each level and preserves preferred widths for auto-sized descendants beneath a capped ancestor. The JavaScript API and binding surface are unchanged.

For a root capped at 8 px around an auto-width middle node and a leaf with width: 86:

[root, middle, leaf].map((node) => tree.getUnroundedLayout(node).size.width);
// [8, 86, 86]

Problem

At Taffy revision 8d13fdc8, the per-node measurement cache maps different parent-size requests to the same fixed entry, so nested column containers repeatedly evict work they need again. DioxusLabs/taffy#1148 tracks that performance defect.

The same revision also reuses one cached measurement for two different flex sizing questions. A preferred width can therefore disappear when the descendant should size to its content and overflow a capped ancestor. DioxusLabs/taffy#1149 tracks that correctness defect.

Both the native and Wasm packages compile the same Rust binding, so both exposed these behaviors.

Result

  • Taffy is pinned to 77f38568, the Taffy 0.14.0 release commit. It includes the new multi-entry measurement cache, applies preferred flex sizes separately from content measurement, and also contains upstream intrinsic-sizing fixes for cleared floats and negative margins.
  • The shared public API suite covers the three-node preferred-width case against both @taffyjs/node and @taffyjs/wasm.
  • The lockfile and internal evidence links retain the exact source revision, while public package and website docs identify the release as Taffy 0.14.0.
  • The published benchmark dataset contains a complete run from its fixed Apple M3 Pro host.

Benchmarks

The publication profile puts @taffyjs/node at parity with or ahead of yoga-layout in nine of twelve comparable scenarios under #53's 1.10× parity boundary. The cache-sensitive and remaining measured scenarios are:

Scenario @taffyjs/node yoga-layout Relative time Measure calls, node / Yoga
Incremental frame: one leaf 0.235 ms 0.436 ms +1.86× 5 / 1
Incremental frame: one tenth 3.771 ms 0.591 ms -6.39× 785 / 10
Incremental frame: every leaf 4.798 ms 2.571 ms -1.87× 1,074 / 87
Measured render: medium 1.610 ms 1.425 ms -1.13× 440 / 37
Nesting depth: 2 0.484 ms 0.818 ms +1.69× 0 / 0
Nesting depth: 6 0.539 ms 0.742 ms +1.37× 0 / 0
Nesting depth: 10 0.575 ms 0.752 ms +1.31× 0 / 0

The complete publication profile passed the repository's 10% relative-margin-of-error and 25% round-median-spread gates. The remaining three slower scenarios all measure text through JavaScript callbacks and remain tracked in #53.

Validation

  • vp run check
  • vp run check:wasm
  • vp run check:codegen
  • vp run benchmark:update-website
  • vp run build:website

The shared preferred-width regression is red at Taffy revision 8d13fdc8 with [8, 8, 8] and green at Taffy 0.14.0 with [8, 86, 86]; check:wasm runs the same suite against the Wasm package.

Part of #53.

@hyfdev
hyfdev marked this pull request as ready for review August 25, 2026 03:20
Copilot AI lite review requested due to automatic review settings August 25, 2026 03:20
@hyfdev
hyfdev merged commit 63511e7 into main Aug 25, 2026
8 checks passed

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.

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