mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +02:00
layout: Cache SameFormattingContextBlock layout results (#42904)
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`). Testing: This change adds a new Servo-specific WPT test that verifies that the minimal number of `Fragment`s are rebuilt after an incremental layout. Previously, when running `flexbox-deeply-nested-column-flow.html` from `tests/blink_perf_tests/perf_tests/layout/`, performance would degrade with successive test runs. This is due to how slow inline layout is. This change removes that progressive degradation, though we may be able to remove this cache with improvements to inline layout. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Luke Warlow <lwarlow@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
7
tests/wpt/mozilla/meta/MANIFEST.json
vendored
7
tests/wpt/mozilla/meta/MANIFEST.json
vendored
@@ -13159,6 +13159,13 @@
|
||||
null,
|
||||
{}
|
||||
]
|
||||
],
|
||||
"preserved-same-formatting-context-block-layout.html": [
|
||||
"068936574cedc2ad55a98f8a24ea419fab3535cf",
|
||||
[
|
||||
null,
|
||||
{}
|
||||
]
|
||||
]
|
||||
},
|
||||
"input-events": {
|
||||
|
||||
Reference in New Issue
Block a user