layout: Cache SameFormattingContextBlock layout results#42904
Open
mrobinson wants to merge 1 commit intoservo:mainfrom
Open
layout: Cache SameFormattingContextBlock layout results#42904mrobinson wants to merge 1 commit intoservo:mainfrom
SameFormattingContextBlock layout results#42904mrobinson wants to merge 1 commit intoservo:mainfrom
Conversation
|
🔨 Triggering try run (#22481625265) for Linux (WPT) |
This change has two parts: - Add a cache for `SameFormattingContextBlock`s: A new kind of cache is added which allows reusing fragments for `SameFormattingContextBlock` (the majority of block level elements). This can reduce the amount of fragment tree construction during incremental layout (although with a 40 byte overhead per `SameFormattingContextBlock`). - Do not propagate layout damage down to undamaged descendant boxes. This is necessary for the cache to remain valid during reflow and, upon reflection, was probably never necessary. Fragment caches are already stored with their layout inputs, so should never be reused unless they are still valid. In other cases, fragment tree layout will happen regardless. Signed-off-by: Martin Robinson <[email protected]> Co-authored-by: Luke Warlow <[email protected]> Co-authored-by: Oriol Brufau <[email protected]>
980e859 to
e5712e0
Compare
|
Test results for linux-wpt from try job (#22481625265): Flaky unexpected result (26)
Stable unexpected results that are known to be intermittent (12)
|
|
✨ Try run (#22481625265) succeeded. |
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.
This change has two parts:
SameFormattingContextBlocks: A new kind of cacheis added which allows reusing fragments for
SameFormattingContextBlock(the majority of block level elements).This can reduce the amount of fragment tree construction during
incremental layout (although with a 40 byte overhead per
SameFormattingContextBlock).necessary for the cache to remain valid during reflow and, upon
reflection, was probably never necessary. Fragment caches are already
stored with their layout inputs, so should never be reused unless they
are still valid. In other cases, fragment tree layout will happen
regardless.
Testing: This change adds a new Servo-specific WPT test that verifie that
the minimal number of
Fragments are rebuilt after an incremental layout.