Closed Bug 791997 Opened 12 years ago Closed 12 years ago

nytimes.com in a background tab reflows the whole browser periodically

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: ttaubert, Unassigned)

References

Details

(Keywords: perf, reproducible, Whiteboard: [Snappy])

While trying to investigate bug 786940, I opened like 20-30 of nytimes.com tabs and the whole browser quickly got unusable. I reduced my testcase to three background tabs (nytimes.com) and started profiling: http://people.mozilla.com/~bgirard/cleopatra/?report=545d8568bfaae50a2fd8c8a3c823127cdd2125be Now looks like we're reflowing all the time because of this: http://b.scorecardresearch.com/c2/3005403/cs.js http://pastebin.mozilla.org/1829083 (beautified version) There's some function that is repeatedly called using setTimeout() that triggers reflows. Even worse, it's triggering whole-browser reflows somehow. If you enable paint flashing you can easily see that just one nytimes.com tab opened in the background causes the whole browser window to reflow periodically (I think every second). This easily sums up with lots of tabs of course.
Argh, that's related to bug 786484. With browser.newtab.preload=false the only thing that's repainted is the nytimes.com tab itself.
Depends on: 786484
Also, the stupid script manages to redraw the whole nytimes content every second. Which probably still is very costly even if throttled down in the background. Not sure we can do anything about that.
That profile shows the profiler itself doing changes in chrome, if I read it right. If you disable the profiler, do you still see nytimes in a background tab causing repaints of the whole chrome? But yes, in general nytimes has some "ticker" script that keeps changing the page on a timer, so if you have lots of them open it can start to chew up a good bit of CPU...
Redraws in a background tab just don't happen, which should not be costly at all.
The profiler doesn't make a difference for me. As soon as I disable browser.newtab.preload everything's fine again. We'll work around bug 786484 in bug 780123 which doesn't fix the underlying layout bug. Somehow the extra <browser> element makes the layout invalidation not behave as it should.
OK, let's take this up in bug 786484.
IIRC the original issue reported was purely caused by bug 786484. I think we can close this one.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.