Extremely slow scrolling of ESPN.com with trunk builds




Layout: View Rendering
13 years ago
12 years ago


(Reporter: RyanVM, Assigned: roc)


(4 keywords)

Windows XP
fixed1.8, regression, testcase, top100

Firefox Tracking Flags

(Not tracked)




(3 attachments)



13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050218 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050218 Firefox/1.0+

I've noticed since I started to play around with the trunk (after previously
using the 1.0 release build) that espn.com performance is greatly diminished in
comparison to the Aviary branch.  Scrolling is very slow and eats up my CPU (an
AMD Barton @ 2.26GHz), slowing down everything else on my system too.

Reproducible: Always

Steps to Reproduce:


13 years ago
Ever confirmed: true
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050408
http://www.espn.com/ is scrolling fine for me. Are you still seeing this problem
with later trunk builds?

Comment 2

13 years ago
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050408

Yup, still seeing it.
Version: unspecified → Trunk

Comment 3

13 years ago
I am seeing this bug as well with april 8th trunk build.

Comment 4

13 years ago
This seems to be related to ClearType (turn it off and the page scrolls fine).
This is also the case for bug #  201307 which seems to be very similar.

Comment 5

13 years ago
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050411

Not using ClearType and scrolling is HORRIBLY slow.

Comment 6

12 years ago
I narrowed the regression window down. This horrible slowdown first appeared
with the 2004-09-04 nightly.  Looking at Bonsai for that time frame, it seems
that the likely culprit is the patch checked in for Bug 72747, which made many
changes related to scrolling.

Adding dbaron and roc as CCs to this bug.
Assignee: firefox → nobody
Component: General → Layout
Product: Firefox → Core
QA Contact: general → layout
You didn't mention build hours of the nightlies, but they're generally not
generated at midnight. 
is a broader range of checkins to consider, but hours (for both the build
without the problem and the build with) would be nice.

Comment 8

12 years ago
The timestamp for the working Sept. 3 build is: 03-Sep-2004 08:45
The timestamp for the broken Sept. 4 build is: 04-Sep-2004 08:25

This is the query from Sept. 3 8PM to Sept. 4 8:30PM


12 years ago
Flags: blocking1.9a1?

Comment 9

12 years ago
This is a pretty major issue. See
Keywords: top100
Created attachment 198133 [details]

The overflow-y/overflow-x patch exposed this bug, because there is a rule for
div class="navdivider" with overflow-y:hidden.
This testcase is comparable to the espn.com situation, regarding the scrolling
It scrolls fast for me in Mozilla1.7.12, but slow in current trunk build.
The precise regression range I get is between 2004-08-10 and 2004-08-11:

Maybe because of bug 253572?


12 years ago
Keywords: regression, testcase


12 years ago
Blocks: 309224
Ok, I backed out the patch from bug 253001, and that seems to fix the slow
scrolling issue on this testcase.
I think this is rather important to fix for 1.8.

Comment 12

12 years ago
Martijn, can you try experimenting with the MAX_OPAQUE_REGION_COMPLEXITY value?
 What do you see?

I really don't see how that should be affecting things here, though.  :(
Component: Layout → Layout: View Rendering


12 years ago
Assignee: nobody → roc
QA Contact: layout → ian
Setting MAX_OPAQUE_REGION_COMPLEXITY to 1 still scrolls slowly.
Setting MAX_OPAQUE_REGION_COMPLEXITY to 100 scrolls fast.

Comment 14

12 years ago
Is the breakpoint the same as the number of divs you have on the page or

Note that I'm _really_ confused because I'm not really seeing much in the way of
opaque views here...
There are 92 <div class="navdivider">'s in the testcase.
I've tested with the following MAX_OPAQUE_REGION_COMPLEXITY values:
50 fast
47 fast
45 reasonably fast although it's a bit slower
40 slow
30 slow
Created attachment 198291 [details]
Better testcase

This quantifies the slower scrolling a bit.
The results I get are:
2004-08-10 build: 2604ms
2004-08-11 build: 10344ms
2005-10-02 build: 10536ms
I'm using a Duron600Mhz, 512MB, NVidia GeForce2MX 200/100 on WinXP.
The navdividers are opaque and have views.

This is happening in nsViewManager::CanScrollWithBitBlt. It creates a display
list to see if there's anything that prevents us from doing a bitblt.
OptimizeDisplayList fills up the region with MAX_OPAQUE_REGION_COMPLEXITY
different rectangles and then gets to the scrolled view. This view has a uniform
background and so we would normally add its area to the opaque region, which
covers up the views underneath so we know that none of that underneath content
(which is not being scrolled) is visible. In this case we don't add the scrolled
view's area to the opaque region because we've already maxed out the complexity.
This means we think the element is transparent with the underneath content
showing through, and therefore we have to do a full repaint instead of just a

Comment 18

12 years ago
Hmm.  So could we ignore the MAX_OPAQUE_REGION_COMPLEXITY setting for opaque
background views when doing scrolling analysis?  That is, are there cases when
we'd have lots of non-opaque views with uniform background?
Sorry, my last comment was incorrect.
Well, it's correct enough. In this case the uniform-background path doesn't kick
in, but the canvas background is opaque and it should be hiding the views
underneath it, but it isn't added to the opaque region because of the complexity
Created attachment 198666 [details] [diff] [review]

I don't like the idea of allowing unlimited complexity during scroll analysis,
because it could cause N^2 behaviour in exactly the situations where we
originally introduced the complexity limit (lots of abs-pos elements with solid

This approach lets us violate the complexity limit if the area to be added to
the opaque region will entirely cover the opaque region. This is safe because
it will actually make the opaque region very simple. It means that solid canvas
backgrounds, as in this case, will always be able to be added.
Attachment #198666 - Flags: superreview?(bzbarsky)
Attachment #198666 - Flags: review?(bzbarsky)

Comment 22

12 years ago
Comment on attachment 198666 [details] [diff] [review]

Nice!  r+sr=bzbarsky
Attachment #198666 - Flags: superreview?(bzbarsky)
Attachment #198666 - Flags: superreview+
Attachment #198666 - Flags: review?(bzbarsky)
Attachment #198666 - Flags: review+
checked in on trunk.
Last Resolved: 12 years ago
Resolution: --- → FIXED
Let's apply for RC1 approval in a couple of days.

Comment 25

12 years ago
This fix dropped the rendering time of the testcase from 2110ms to 1891ms on my
(extremely fast) Athlon64 X2 3800+ system. I'm sure it'll make a bigger
difference on slower systems, but there's certainly a positive impact on
Comment on attachment 198666 [details] [diff] [review]

This is a low-risk fix that should go on the branch. It fixes scrolling
performance on espn.com and probably some other sites.
Attachment #198666 - Flags: approval1.8rc1?

Comment 27

12 years ago
This bug says in the summary that it's a problem on the trunk. I don't see any
obvious slowness on the branch at ESPN. Do we need this fix there? What's the
risk and what kind of testing would we need to feel confident about taking this
change into 1.8rc1?

Comment 28

12 years ago
> This bug says in the summary that it's a problem on the trunk.

Trunk as of February 2005....

> Do we need this fix there?

I would say yes.

> What's the risk and what kind of testing would we need to feel confident about
> taking this change into 1.8rc1?

The risk is very very low.  I can't actually think of any cases in which the new
code would behave differently from the old one painting-wise except to be a bit
faster, so I'm really not even sure what to suggest we test....  Scrolling in
general, I guess.  Especially on pages with various opacity, positioned content,

Comment 29

12 years ago
Comment on attachment 198666 [details] [diff] [review]

I don't think this is a big enough performance problem to warrant a change this
late in the game.
Attachment #198666 - Flags: approval1.8rc1? → approval1.8rc1-

Comment 30

12 years ago
Comment on attachment 198666 [details] [diff] [review]

After email discussion with Boris, we've agreed to take this fix. Thanks for
the follow-up BZ.
Attachment #198666 - Flags: approval1.8rc1- → approval1.8rc1+
Fixed on branch.
Keywords: fixed1.8


12 years ago
Flags: blocking1.9a1?
You need to log in before you can comment on or make changes to this bug.