Closed Bug 157903 Opened 23 years ago Closed 23 years ago

timerout has vast speed diff between ie5/6 ns4/7/moz

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows ME
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 64516

People

(Reporter: bozie, Assigned: jst)

References

()

Details

(Whiteboard: [DUPEME])

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.1b) Gecko/20020717 BuildID: 2002071704 DHTML snow in javascript displays at much different droping speeds in ie5/6 ns4.79 and netscape 7 or moz daily. Speed changes with cursor movement on screen. (this is not a follow cursor script. timing is affected by moving the mouse in all browsers tested. Reproducible: Always Steps to Reproduce: 1.tried it in all july dailys. 2. 3. Actual Results: same, drop speeds vary a lot between browsers. Expected Results: same timing this script tests for ie, ns4, and ns6+
This is a DHTML or Layout performance issue, not JS Engine. Here is the principal function: function snowIE_NS6() { // IE and NS6 main animation function for (i = 0; i < no; ++ i) { // iterate for every dot yp[i] += sty[i]; if (yp[i] > doc_height-50) { xp[i] = Math.random()*(doc_width-am[i]-30); yp[i] = 0; stx[i] = 0.02 + Math.random()/10; sty[i] = 0.7 + Math.random(); doc_width = ns6up?window.innerWidth-50 : document.body.clientWidth-50; doc_height = ns6up?window.innerHeight : document.body.clientHeight; } dx[i] += stx[i]; if (ie4up){ document.all["dot"+i].style.pixelTop = yp[i]; document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]); } else if (ns6up){ document.getElementById("dot"+i).style.top=yp[i]; document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i]); } } setTimeout("snowIE_NS6()", 10); } On my WinNT(SP6) 500MHz 128RAM, this takes up about 60% CPU in IE6. But in Mozilla trunk 20020715xx, it pins the CPU at 100%. In IE6 the snowflakes fall smoothly in microscopic increments. In Moz the movements seem to coalesce and are very awkward-looking. Reassigning to DOM Level 0. Note the DHTML performance tracking bug 21762. If this bug is not a duplicate of any other, we should add it as a dependency to that tracking bug -
Assignee: rogerl → jst
Status: UNCONFIRMED → NEW
Component: JavaScript Engine → DOM Level 0
Ever confirmed: true
QA Contact: pschwartau → desale
While the page is loading I too see the weird movement of the snowflakes, but once the page finishes loading the movement of the snowflakes is nice and smooth. We do use 100% cpu tho... I bet this is a dupe of the other "snowflake" bug whose number I don't have handy...
Whiteboard: [DUPEME]
This looks like it: bug 64516 "95-99% CPU usage for DHTML 'snow effect'". I will dupe this bug against it and add the URL to the info in that bug. bozie@bozman.net: thank you for this report; you will be cc'ed on the duplicate bug so you can follow its progress - *** This bug has been marked as a duplicate of 64516 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.