Wednesday, June 5, 2013

IE and Do you want to stop running this script?

So we hit this issue, just before we all set for the evening, IE throws up a pop up "Do you want to stop this script.."? it turns out that IE keeps track of the number of script statements that gets executed from an entry point. This limit in IE is 5 million statements, so if you run above this, then IE is going to think that you script is taking too long to execute and will throw up the warning pop up.

Now I am not sure why IE has that limit, unlike FireFox where you get the message after a certain period of time. In both cases I guess it would be a good idea to think of how your screen lays out data and the amount of processing it does.

In our case, it turns out that the view was being bound with around 5000 rows (not a good idea!!) of data into a grid and that caused our script to be taken as a candidate that has reached the limit of 5M statement. IE does not allow an easy way to increase this limit, the closest is changing a registry entry.

Link to the KB site http://support.microsoft.com/kb/175500

No comments:

Post a Comment