Closed Bug 9003 Opened 25 years ago Closed 25 years ago

Dynamic Positioning is "wonky"

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

VERIFIED INVALID

People

(Reporter: shashi, Assigned: vidur)

References

()

Details

(Whiteboard: [TESTCASE] shashi@narain.com)

The movement of the icons are done by manipulating the CSS left: property via JS. The first icon moves across the screen very smoothly but each subsequent icons movement gets choppier and choppier (the last icon doesn't even show any movement...it seems to just fall into place).
Whiteboard: [TESTCASE] shashi@narain.com
Assignee: rickg → vidur
V -- the images are supposed to move across the page, but they slow down to a crawl, then stop altogether. Please take a look--perhaps it's a JS bug.
While reviewing the testcase locally, I noticed that my CPU monitor was indicating 100% usage (I am using a PIII-450). Rather high CPU usage for doing something so simple.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → INVALID
The problem is actually in the script. Because of a missing "else" statement, the number of timeouts being added increases exponentially with each image that moves across. At some point, the timeout load stifles the compositor. Fixing the scripts to include the else (see example below for one of the routines that needed to be modified) results in acceptable and consistent performance through the duration of the script. function MoveGeckoIcon(start, finish, step, speed){ if (start < finish){ document.getElementById("geckoIcon").style.left = start+"px"; start=start+step; setTimeout("MoveGeckoIcon("+start+","+finish+","+step+","+speed+")",speed); } /* This is the else that needed to be added */ else if (start >= 710) { MoveWelcomeIcon(-65,710,10,5); } }
Status: RESOLVED → VERIFIED
Based on Vidar's comments, Marking as verified invalid.
Since this bug is fixed, I am removing the testcase from my server.
You need to log in before you can comment on or make changes to this bug.