abc@home Posted July 22, 2005 Share Posted July 22, 2005 Recently I find that FF is quite sluggish in handling dynamic menus and make a simple test to verify: <html> <body style="overflow:hidden"> <div id=dot style="position:absolute; width:20px; height:20px; top:0px; left:0px; background-color:brown"></div> <script language="javascript"> var test=document.getElementById('dot'), count, start; function move(){ test.style.left=parseInt(test.style.left)+1+'px'; count+=1; if(parseInt(test.style.left)+20<document.body.clientWidth) setTimeout('move()',10); else{ var stop=new Date(); alert('time taken:'+(stop.getTime()-start.getTime())/1000+'\npixel moved:'+count+'\npixel per second:'+count*1000/(stop.getTime()-start.getTime())); test.style.left='0px'; } } </script> <br><br><br><button onclick="count=0; start=new Date(); move()">start</button> </body> </html> As seen, the red dot should move 100 pixels per second and it does in both IE and opera, saved minor roundings. But it can only move around 60 pixels per second in both FF and deer park alpha 2. I tried in 2 desktops and 1 laptop (admittedly aged) with win2k/xp, and all got similar results. Anyone else got this problem? Link to comment Share on other sites More sharing options...
abc@home Posted July 23, 2005 Author Share Posted July 23, 2005 Nobody else have this problem or nobody want to confirm the problem? I had posted in mozillazine before and didn't get any reply neither. Please do me a favor and copy the code, paste in notepad, and do the test in FF, Opera and IE. As you can see the code does no harm to whatsoever. Before I can post a bug, at least I need someone to confirm that's not an isolated problem in my part. Thanks! Link to comment Share on other sites More sharing options...
zhangm Supervisor Posted July 23, 2005 Supervisor Share Posted July 23, 2005 Roughly 60px/s using DPa2 Roughly 100px/s using IE 6 Link to comment Share on other sites More sharing options...
Recommended Posts