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:
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050408 Firefox/1.0+ http://www.espn.com/ is scrolling fine for me. Are you still seeing this problem with later trunk builds?
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050408 Firefox/1.0+ Yup, still seeing it.
I am seeing this bug as well with april 8th trunk build.
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.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050411 Firefox/1.0+ Not using ClearType and scrolling is HORRIBLY slow.
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. http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2004-09-03&maxdate=2004-09-04&cvsroot=%2Fcvsroot Adding dbaron and roc as CCs to this bug.
You didn't mention build hours of the nightlies, but they're generally not generated at midnight. http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=SeaMonkeyAll&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2004-09-03&maxdate=2004-09-05&cvsroot=%2Fcvsroot is a broader range of checkins to consider, but hours (for both the build without the problem and the build with) would be nice.
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 http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=SeaMonkeyAll&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2004-09-03+20%3A00%3A00&maxdate=2004-09-04+20%3A30%3A00&cvsroot=%2Fcvsroot
This is a pretty major issue. See http://testrunner.mozilla.org/litmus/show_test.cgi?id=260.
Created attachment 198133 [details] testcase 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 regression. 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: http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2004-08-10+07%3A00%3A00&maxdate=2004-08-11+08%3A00%3A00&cvsroot=%2Fcvsroot Maybe because of bug 253572?
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.
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. :(
12 years ago
Setting MAX_OPAQUE_REGION_COMPLEXITY to 1 still scrolls slowly. Setting MAX_OPAQUE_REGION_COMPLEXITY to 100 scrolls fast.
Is the breakpoint the same as the number of divs you have on the page or thereabouts? 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 bitblt.
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 limit.
Created attachment 198666 [details] [diff] [review] fix 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 backgrounds). 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.
Comment on attachment 198666 [details] [diff] [review] fix Nice! r+sr=bzbarsky
checked in on trunk.
Let's apply for RC1 approval in a couple of days.
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 performance!
Comment on attachment 198666 [details] [diff] [review] fix This is a low-risk fix that should go on the branch. It fixes scrolling performance on espn.com and probably some other sites.
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?
> 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, etc.
Comment on attachment 198666 [details] [diff] [review] fix I don't think this is a big enough performance problem to warrant a change this late in the game.
Comment on attachment 198666 [details] [diff] [review] fix After email discussion with Boris, we've agreed to take this fix. Thanks for the follow-up BZ.
Fixed on branch.