Clipping and layer positioning is unsually long to execute

VERIFIED DUPLICATE of bug 64516

Status

()

Core
Layout
VERIFIED DUPLICATE of bug 64516
17 years ago
17 years ago

People

(Reporter: fstmaurice, Assigned: buster)

Tracking

(4 keywords)

Trunk
css2, perf, regression, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

17 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; 0.7) Gecko/20010109
BuildID:    20001010901

In the following attachement, I have a script of a scroller object that displays
news. Scrolling between the the text elements is unusually slow.

Reproducible: Always
Steps to Reproduce:

- Load the scroller object in IE5 and look at the speed it scrolls
- Load the object in NS6 and look at the speed it scrolls. The speed is reduced,
but acceptable.
- Load the object in Mozilla 0.7. The speed is considerably reduced compared to NS6.

Actual Results:  In NS6, the script is slower to exectue than IE5. In Mozilla
0.7, it is slower than NS6

Expected Results:  Ideally, the script should be as fast in the three browsers.

I have isolated the slowdown in the script (as explained in the attachement).
Two functions are causing the slowdown.

function moveLayerBy(layer, dx, dy)
{
	layer.style.left = parseInt(layer.style.left) + dx;
	layer.style.top = parseInt(layer.style.top) + dy;
}

function clipLayer(layer, clipleft, cliptop, clipright, clipbottom)
{
	layer.style.clip = 'rect(' + cliptop + ' ' +  clipright + ' ' + clipbottom + ' '
+ clipleft +')';
}

In the script, those two functions are supposed to be executed every 20ms.
Unfortunately, the execution of those two functions combined can take up to
100ms of execution time.

I was amazed about the speed difference between NS6 and Moz 0.7 so I tested the
script on many nightly builds (windows) to see where in time the slowdown
appeared. Here are my results:

On every build prior to 2000121508, the object behaves the NS6 way.
On every build between 2000121508 and 2000122108, the object does not execute at
all.
On every build since 2000122120, the object behaves the Moz 0.7 way.
(Reporter)

Comment 1

17 years ago
Created attachment 22446 [details]
Scroller object - unusually slow

Comment 2

17 years ago
Confirmed
Platform: PC
OS: Linux 2.2.16
Mozilla Build: 2001011208


Very nice testcase btw.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: testcase
OS: Windows NT → All
Hardware: PC → All
(Reporter)

Comment 3

17 years ago
I just realize I've picked the wrong component. I wanted to put it as as CSS2
problem but picked DOM2.

Changing component to style system.
Component: DOM Level 2 → Style System
=>Layout (not style system, which deals with the css parser/cascade/etc)

This works fine in IE5; I'm guessing this is an embedding requirement, too.
Nominating for nsbeta1.
Assignee: jst → buster
Component: Style System → Layout
Keywords: css2, mozilla1.0, nsbeta1, perf, regression
Me thinks this is a dup of bug 64516, I had a look with quantify and the data I
looked at is very similar to what's reported in that bug.

*** This bug has been marked as a duplicate of 64516 ***
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → DUPLICATE
VERIFIED ensured DUPLICATE (copied stuff over)
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.