Repository navigation
Conversation
|
I'll fix CI failures and address comments from users with write access that start with 'Devin'.
|
This branch has not been deployed
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.
Objective
Skip the layout cache for childless, context-free, visible nodes in
TaffyTree. These leaves are cheaper to recompute than to look up and store: a cache probe, a key build and a store cost more than the leaf algorithm itself. The idea comes from cephal, which handles such "cheap leaves" before the cache lookup.Changes
TaffyView::compute_child_layoutcallsmeasure_functiondirectly for these nodes. There is no cache lookup or store, and no OOF pass (a leaf has no hoisted children).NodeData::has_uncached_layoutkeepsdirty()accurate for these nodes: clean after layout, dirty aftermark_dirty/set_style/a hidden layout.mark_dirtyalways continues to the starting node's parent. ItsAlreadyEmptyearly exit now applies only to ancestors, because a bypassed leaf's cache is always empty.Benchmarks
Alternating main/branch runs, 3 each, pinned to one core,
--measurement-time 3, on a VM (up to ~1.8% CPU steal). Median of the three Criterion estimates:Feedback wanted
compute_layout_with_measureis now called on every query for context-free leaves, instead of having its result cached. That's fine for the usual "no context → zero size" functions, but it is a behaviour change for anyone doing real work there. Should it get a CHANGELOG note, or should the bypass be limited tocompute_layout(the built-in measure)?Link to Devin session: https://dioxus.staging.devinenterprise.com/sessions/590d5c946bbe49cebc90460f69dd0bd3
Open in Devin Desktop: https://dioxus.staging.devinenterprise.com/desktop/session/590d5c946bbe49cebc90460f69dd0bd3?variant=devin-insiders