Closed Bug 65200 Opened 24 years ago Closed 24 years ago

Clipping and layer positioning is unsually long to execute

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 64516

People

(Reporter: fstmaurice, Assigned: buster)

Details

(4 keywords)

Attachments

(1 file)

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.
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
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
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
Closed: 24 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.

Attachment

General

Creator:
Created:
Updated:
Size: