faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

35 of 70 people (50%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

I get a popup: script on this page is causing IE to run slowly.. yet if i modify it it takes longer to run, but doesn't give that message (???)

Apr 4th, 2008 21:02
ha mo, Juergen Thelen, Tom,


This can happen due to various reasons, but usually the dialog box you 
mentioned either pops up, if your script is hanging in an endless loop, 
or if it not hanging, but executing much more statements than the MS 
developers thought should ever happen... ;o)
The former reason should be self-explanatory.
When it comes to the latter:
The script engines of IE4/IE5/IE6 are tracking the total number of 
executed script statements in your current document. When that value 
hits a specific threshold (more than 5 million statements afaik), IE 
will throw up your mentioned timeout dialog box...
In case you got caught by this... hmmm... 'script eating cpu' prob :O)
try to optimize your code to get below this 5 million statements. If 
this isn't possible try splitting your code in chunks and spread them 
over several documents.
Hth, Juergen
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com