Closed Bug 820541 Opened 12 years ago Closed 11 years ago

Metrics.mozilla.com measures much slower to scroll then on Chrome

Categories

(Core :: Layout, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla20

People

(Reporter: BenWa, Unassigned)

References

Details

Attachments

(1 file)

STR:
1) Open metrics.mozilla.com
2) Open the 'measure' dropdown
3) Scroll

We are an order of magnitude slower then chrome:
http://people.mozilla.com/~bgirard/cleopatra/#report=ff3820a75851a0b09f18914ceec99ca9798a3f37

Time is spent in:
ContainerState::ProcessDisplayItems
and PL_DHashTableEnumerate
According to instruments about 80% of our L2 references are misses making this very uncache friendly. I'd guess that this hashtable is big.

people.mozilla.com/~bgirard/screenshots/7~.png
I don't remember why we were calling ProcessRemovedDisplayItems once per layer, but I can't see a good reason too.

This page is building a *huge* inactive layer tree, each item in the graph is separately wrapped in a transform. We then were iterating the entire hashtable separately for each layer.

Scrolling is much smoother with this applied.

Still a lot of time being spent building layers, but nothing really stands out. I'm sure we can micro optimize some things, but pages with this many display items will always have some overhead.
Attachment #691232 - Flags: review?(roc)
Comment on attachment 691232 [details] [diff] [review]
Only call ProcessRemovedDisplayItems once per transaction

Review of attachment 691232 [details] [diff] [review]:
-----------------------------------------------------------------

Good catch. We should uplift this as far as we can.

::: layout/base/FrameLayerBuilder.cpp
@@ +998,5 @@
> +      InvalidatePostTransformRegion(t,
> +                                    data->mGeometry->ComputeInvalidationRegion(),
> +                                    data->mClip,
> +                                    layerBuilder->GetLastPaintOffset(t));
> +  }

Fix indent
Attachment #691232 - Flags: review?(roc) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/ae5fe2ec2f22

Agreed. I'll give it a few days on central, and request approval next week.
https://hg.mozilla.org/mozilla-central/rev/ae5fe2ec2f22
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla20
Blocks: 848965
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: