Closed Bug 1159459 Opened 10 years ago Closed 9 years ago

Lots of time dealing with scrollframes after treeherder layout

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox40 --- affected

People

(Reporter: bzbarsky, Unassigned)

References

Details

Attachments

(1 file)

STEPS TO REPRODUCE: 1) Load http://treeherder.mozilla.org/ 2) Scroll down to the bottom. 3) Click the "50" button to load more results. 4) Open the web console. 5) Run this script: document.documentElement.style.display = "none"; document.body.offsetWidth; var start = new Date; document.documentElement.style.display = ""; getComputedStyle(document.documentElement).color; var mid = new Date; document.body.offsetWidth; console.log("Style: " + (mid - start) + "\nLayout: " + (new Date - mid)); We spend a lot of time on layout here. I profiled it, and 20% of the time under ProcessReflowCommands is actually spent under DidDoReflow, calling ScrollFrameHelper::ReflowFinished. Some of this is then FinishReflowForScrollbar, but most is ScrollToImpl, which is all under GetPaintedLayerScaleForFrame. Mostly the hashtable lookup, with a bit of GetTransformToAncestor calling GetTransformMatrix.
Flags: needinfo?(roc)
Timothy, do you know anything about the scrollframe stuff above?
Flags: needinfo?(tnikkel)
I wrote a patch that reduces the number of GetPaintedLayerScaleForFrame calls from ~130 to 1 for your testcase, but it had no noticeable affect on the runtime. In profiling (without my patch) I couldn't find GetPaintedLayerScaleForFrame at all. Do you want to re-do your profiling? Maybe treeherder changed? Or maybe our code changed?
Flags: needinfo?(tnikkel) → needinfo?(bzbarsky)
Hmm. Yeah, something must have changed; I'm not seeing this anymore...
Status: NEW → RESOLVED
Closed: 9 years ago
Flags: needinfo?(bzbarsky)
Resolution: --- → WORKSFORME
Here's the patch I was using in case it's useful in the future.
I think the underlying performance problem here is still present; see bug 1363919.
Blocks: 1363919, 1012752
... or maybe *increased* with bug 1012752, which I now realize landed *after* this bug happened.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: