Closed
Bug 168714
Opened 22 years ago
Closed 22 years ago
Bad JS performance Moz 1.1 and 1.2 compared to Moz 1.0
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
VERIFIED
WONTFIX
People
(Reporter: crisp, Assigned: rogerl)
References
()
Details
(Keywords: perf)
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461) Build Identifier: NaN Compared to the JS performance in Moz 1.0 (which was 3 times better compared to IE6) the performance in Moz 1.1 and Moz 1.2 has been reduced again to IE6 comparable levels. Reproducible: Always Steps to Reproduce: 1.Use Mozilla 1.0 to open page http://www.crisp.demon.nl/crackmd5.html 2.Fill in 'f3abb86bd34cf4d52698f14c0da1dc60' in MD5 and push 'Crack!' 3.On an AMD XP2000+ this takes around 80 seconds to complete 4.Use Mozilla 1.1 or 1.2 to open the same page 5.Again fill in 'f3abb86bd34cf4d52698f14c0da1dc60' in MD5 and push 'Crack!' 6.On an AMD XP2000+ it now takes around 250 seconds to complete Actual Results: Mozilla 1.1 and 1.2 actually perform very poorly compared to 1.0 Expected Results: 1.1 and 1.2 should perform equally to 1.0, or even better
With Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2a) Gecko/20020914 on a Celeron/900@1124 I get 5:19.87 and with IE6 I get 4:45.12, a difference of ~11%. I don't know how fast Mozilla 1.0 is compared to IE6 though.
Comment 2•22 years ago
|
||
On build 2002091309 on Mac OS 9 (since it's a 300 MHz iBook, I don't even bother to check how long it takes), I can see 'current password' & 'current hash' flashing, so you script is trying to updates those on-screen fields. Could this be the reason that it's slower ? I thought that getElementByID() was optimized for Mozilla1.1. That might explain why there's something changed. If you take out the screen-updates (or only do them every 100 iterations or so), it will be a lot faster.
Comment 3•22 years ago
|
||
Oh, I got it. It's the setTimeout() call : you're using a timeout of 1 msec, and bug 123273 has increased the minimum timeout to 10msec. The reason why Mozilla was faster than IE, was that IE was using that minimum, to prevent 'run away' JavaScript. Lots of pages were using a 0 msec timeout, because they thought it means 'run as fast as possible'. Possibly true, but sicne IE was really using 10 msec, the CPU wasn't runnign at 100%. But since Mozilla really tried to have that 0 (or 1) msec timeout, it was very noticable for the rest of the interface. Even though your code was really running faster than IE ... Sorry, I guess this a WONTFIX bug. Your code could easily be changed to execute more 'md5cracks' in a single timeout. But we need that minimum timeout for other pages.
Status: UNCONFIRMED → RESOLVED
Closed: 22 years ago
Resolution: --- → WONTFIX
Thanks y'all; I now do understand fully. Also why IE seemed to be so slow compared to Moz 1.0 I have adjusted my program to set the timeout every 100 tries, and came up with the following figures for comparison (all tests run on my AMD XP2000): Moz 1.0: 475 pwds/sec Moz 1.2a: 375 pwds/sec IE6: 826 pwds/sec Seems that Moz1.2 IS slower than 1.0, but then again it is still alpha-state. Would be nice to know what is causing this though. What is more interesting is the fact that IE6 is more than twice as fast in JS calculation compared to Moz. I still like Moz better though, but thought it would be interesting to let you know
Comment 5•22 years ago
|
||
Those figures would be more or less normal : it's true that the JavaScript-engine of IE is a lot faster than Mozillas. Before you were seeing the difference between the 1msec timeout (Moz) and the 10msec (IE). I'm not sure why Mozilla 1.2a is slower that 1.0 : getElementById should be faster. Have you tried to remove those calls out of the loop ?
getElementById is not the issue here; I am now updating the screen after every 200 calculations, so even if that is faster in Moz 1.2 it wouldn't give any boost in this case. It's the javascript calculations itself that are slower in Moz 1.2 compared to Moz 1.0.
Comment 7•22 years ago
|
||
crisp: thank you for this report and for your interesting site. We will reduce the HTML from your test to make a "standalone" JS shell testcase that can be used to test the JS Engine itelf. cc'ing Mazie on that; we will report back with our findings -
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•