fix: update Taffy to 0.14.0 - #57
Merged
Merged
Conversation
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: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
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.@taffyjs/nodeand@taffyjs/wasm.Benchmarks
The publication profile puts
@taffyjs/nodeat parity with or ahead ofyoga-layoutin nine of twelve comparable scenarios under #53's 1.10× parity boundary. The cache-sensitive and remaining measured scenarios are:@taffyjs/nodeyoga-layoutThe 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 checkvp run check:wasmvp run check:codegenvp run benchmark:update-websitevp run build:websiteThe shared preferred-width regression is red at Taffy revision
8d13fdc8with[8, 8, 8]and green at Taffy 0.14.0 with[8, 86, 86];check:wasmruns the same suite against the Wasm package.Part of #53.