Skip frame destruction bookkeeping when there is nothing to remove
Categories
(Core :: Layout, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | fixed |
People
(Reporter: jjaschke, Assigned: jjaschke)
References
(Blocks 1 open bug)
Details
(Keywords: perf-alert)
Attachments
(1 external file)
Destroying a frame does three lookups that are often unnecessary:
OverflowChangedTracker::RemoveFramecomputesGetDepthInFrameTree(), an ancestor walk, before it notices that it tracks no frames at all.PresShell::RemoveFrameFromApproximatelyVisibleListlooks the frame up inmApproximatelyVisibleFrameseven when that table is empty.nsIFrame::RemoveDisplayItemDataForDeletionlooks up the retained display list builder and removes the frame from its data. But a frame only has an entry in that data while it is modified (IsFrameModified()) or has an override dirty region (HasOverrideDirtyRegion()): those are the only two places that insert entries, and both bits are cleared only after the data has been cleared. A frame with neither bit and no display items has nothing to remove.
Returning early in these cases does not change behavior. It matters when large subtrees are removed, which Speedometer 3 does repeatedly (removing todo items, replacing chart content). On a local node-removal micro-benchmark the three changes together made removing blocks of HTML 1-12% faster and removing SVG content 24-32% faster.
| Assignee | ||
Comment 1•15 days ago
|
||
Removing a frame from the overflow tracker, the approximately visible list and
the retained display list data each did a lookup (or an ancestor walk) even
when there was nothing to remove.
Updated•15 days ago
|
Comment 3•14 days ago
|
||
| bugherder | ||
Comment 4•11 days ago
|
||
Perfherder has detected a devtools performance change from push 6600e416403ce8338af4af1afce8dedd1d3c6903.
No action is required from the author; this comment is provided for informational purposes only.
| Improvements | Test | Platform | Options | Absolute values [old vs new] |
|---|---|---|---|---|
| 22% | damp console.objectexpanded.close.DAMP (doc) | linux2404-64-shippable | e10s fission stylo webrender | 44.46 ms -> 34.73 ms |
| 16% | damp custom.inspector.close.DAMP (doc) | linux2404-64-shippable | e10s fission stylo webrender | 27.02 ms -> 22.82 ms |
| 15% | damp console.objectexpanded.close.DAMP (doc) | macosx1500-aarch64-shippable | e10s fission stylo webrender | 14.23 ms -> 12.15 ms |
| 13% | damp console.objectexpanded.close.DAMP (doc) | windows11-64-24h2-shippable | e10s fission stylo webrender | 28.31 ms -> 24.65 ms |
| 11% | damp custom.inspector.close.DAMP (doc) | macosx1500-aarch64-shippable | e10s fission stylo webrender | 9.26 ms -> 8.25 ms |
| ... | ... | ... | ... | ... |
| 3% | damp custom.netmonitor.bigdatarequests.navigate.DAMP (doc) | macosx1500-aarch64-shippable | e10s fission stylo webrender | 112.07 ms -> 109.04 ms |
Need Help or Information?
If you have any questions, please reach out to acseh@mozilla.com. Alternatively, you can find help on Slack by joining #perf-help, and on Matrix you can find help by joining #perftest.
Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.
Comment 5•11 days ago
|
||
Perfherder has detected a talos performance change from push 6600e416403ce8338af4af1afce8dedd1d3c6903.
No action is required from the author; this comment is provided for informational purposes only.
| Improvement | Test | Platform | Options | Absolute values [old vs new] |
|---|---|---|---|---|
| 20% | perf_reftest_singletons remove-child-with-lengthy-text.html (doc) | macosx1500-aarch64-shippable | e10s fission stylo webrender | 0.95 ms -> 0.76 ms |
| 20% | perf_reftest_singletons remove-child-with-lengthy-text.html (doc) | linux2404-64-shippable | e10s fission stylo webrender | 1.30 ms -> 1.04 ms |
Need Help or Information?
If you have any questions, please reach out to acseh@mozilla.com. Alternatively, you can find help on Slack by joining #perf-help, and on Matrix you can find help by joining #perftest.
Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.
Updated•1 day ago
|
Description
•