A testcase i found on Bugzilla

General discussion and chat (archived)
stravinsky

A testcase i found on Bugzilla

Unread post by stravinsky » 2012-10-17, 07:57

Code: Select all

<!DOCTYPE HTML>
<style type="text/css">
span {opacity:0.5;}
</style>
<body>
<div>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
</div>
<div>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
</div>
<div>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
</div>
<div>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
<span>Hello</span>
</div>
This code scrolls poorly on ALL VERSION OF MOZILLA BASED BROWSERS. , specially with HWA enabled. Just copy the code inside the <div> tag ten-twelve times and open it.
Try scrolling. Grab the scrollbar and try to quickly scroll the page up and down. The page will lag w.r.t. the scroll bar.

EDIT: http://www.2shared.com/document/YyIiidTX/testcase.html Similar page but with enough length to make it actually scrollable.
Last edited by stravinsky on 2012-10-17, 10:41, edited 1 time in total.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35576
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: A testcase i found on Bugzilla

Unread post by Moonchild » 2012-10-17, 09:52

Smooth for me on 15.2

Do note that I properly tagged the code to make it normal html to test. meaning adding HTML HEAD and BODY opening and closing tags. The code as pasted is not properly encoded.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

stravinsky

Re: A testcase i found on Bugzilla

Unread post by stravinsky » 2012-10-17, 10:44

Moonchild wrote:Smooth for me on 15.2
Probably because the code is too small in length to make the page actually scrollable. I have attached a file. Try that.
See the CPU usage while quick scrolling. It is high.

dark_moon

Re: A testcase i found on Bugzilla

Unread post by dark_moon » 2012-10-17, 10:57

Yes can confirm this.

There is 1 sec delay and the scrolling isn't smooth. And the cpu goes to 15+ %

stravinsky

Re: A testcase i found on Bugzilla

Unread post by stravinsky » 2012-10-17, 17:33

Makes me wonder what all is the code doing under the hood to make such simple HTML so expensive.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35576
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: A testcase i found on Bugzilla

Unread post by Moonchild » 2012-10-19, 08:35

CPU is indeed high, if I make it a lot more copies to scroll.
Compositing is the issue.

Transparency is expensive if you apply it to a lot of small objects that are drawn reflowed (not positioned). Basically it's not the kind of webdesign you should be doing, anyway ;)

The code may be "simple" from a source point of view, but it's not simple from a rendering point of view.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

stravinsky

Re: A testcase i found on Bugzilla

Unread post by stravinsky » 2012-10-19, 14:15

So you found the relevant bug then ? ;)

Basically it's not the kind of webdesign you should be doing, anyway ;)
Yet lots of webpages use these type of 'silly' codes frequently. So mozilla has to optimize for it. Because you can bet that Chrome is already optimizing for it.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35576
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: A testcase i found on Bugzilla

Unread post by Moonchild » 2012-10-19, 14:25

Then Chrome is optimizing for something that you wouldn't find "in the wild". And as said I have to copy/paste a LOT of these snippets to make it actually detrimental. How many web pages do you know that have hundreds of reflowed transparent elements? IMO this kind of extreme case is (should be) low priority to "fix"
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

stravinsky

Re: A testcase i found on Bugzilla

Unread post by stravinsky » 2012-10-19, 16:26

This test case performs quite worse on the nightlies. So its a side-effect of recent bugs.

lyceus

Re: A testcase i found on Bugzilla

Unread post by lyceus » 2012-10-20, 01:59

Smooth and fast scroll here, but well with an AMD Phenom X4 and 8 GB ram maybe it's not a surprise.

stravinsky

Re: A testcase i found on Bugzilla

Unread post by stravinsky » 2012-10-20, 03:01

lobocursor wrote:Smooth and fast scroll here, but well with an AMD Phenom X4 and 8 GB ram maybe it's not a surprise.
Why would a Ph X4 be obviously smoother ? AMD Ph X4 are comparable to intel core2quad. Which are decidedly old compared to the IvyBridge generation. And PM uses one core anyway.
That 8GB RAM is useful only if you had been forced to use pagefile in absence of that RAM.....

lyceus

Re: A testcase i found on Bugzilla

Unread post by lyceus » 2012-10-21, 02:57

stravinsky wrote:
lobocursor wrote:Smooth and fast scroll here, but well with an AMD Phenom X4 and 8 GB ram maybe it's not a surprise.
Why would a Ph X4 be obviously smoother ? AMD Ph X4 are comparable to intel core2quad. Which are decidedly old compared to the IvyBridge generation. And PM uses one core anyway.
That 8GB RAM is useful only if you had been forced to use pagefile in absence of that RAM.....
Well if I remember the 8GB ram means that more windows functions works in pure ram and leave the process free of disk writes. WIN XP 64 may be old, but is less taxing than Windows Vista/7 64 bits, so basically I'm trying to kill bugs with a cannon, old but still a cannon. Also few people has 8 GB RAM for start, I do the test in a non common configuration.

Locked