0

Just receiving the following error now and then in IE when loading one of my pages.

A script on this page is causing Internet Explorer to run slowly. If it continues to run, your computer might become unresponsive.

The page does take a long time to load, and basically list a bunch of products, which is displayed in nested repeaters.

I am just wondering what is the best way to trouble shoot this bug ?

And what prompts this bug, is it page load time, an infinite loop, etc..

EDIT : I just noticed the page loads pretty much instantly in firefox, so must be an IE thing.

StevieB
  • 6,263
  • 38
  • 108
  • 193
  • The error is from IE's JavaScript engine usually. It can occur if there is a lot of data coming into the page and/or a lot of data being parsed by JavaScript. – kpcrash Mar 14 '12 at 14:50
  • possible duplicate of [Stop running this script, IE7](http://stackoverflow.com/questions/5667456/stop-running-this-script-ie7) – Cᴏʀʏ Mar 14 '12 at 14:50
  • I noticed this bug only occurs in IE where the page takes 10 secs or so to load but instantly in firefox. Any ideas why this would happen ? – StevieB Mar 14 '12 at 14:51

1 Answers1

1

If JavaScript executes more than a set number of statements without yielding (returning from a function), IE will throw up this dialog.

The maximum number of consecutive statements is stored in HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Styles\MaxScriptStatements and defaults to 5,000,000.

josh3736
  • 139,160
  • 33
  • 216
  • 263
  • Hey josh I also just noticed this slow page loading only occurs in IE, and pretty much instant in firefox. So would this be likely an IE javascript issue ? – StevieB Mar 14 '12 at 14:54
  • What version of IE? Firefox has a much faster JS engine than IE≤8. – josh3736 Mar 14 '12 at 14:57
  • In IE7 and IE8 it takes 3/4 times as long to load as in firefox – StevieB Mar 14 '12 at 14:58
  • There's your answer. Old IE [takes longer](http://robert.penz.name/122/javascript-engines-comparison/) to execute script. It's clear you have some severe client-side performance issues; you might want to revisit your design. – josh3736 Mar 14 '12 at 15:07
  • So this issue is related to some innefficient JS or Jquery on my page ? – StevieB Mar 14 '12 at 15:14
  • Yes. Pretty much the only thing that causes this dialog to pop up is a long-running script (usually a long loop). – josh3736 Mar 14 '12 at 16:58
  • Even I am Facing the same problem here.So I have to change my script.? – Manoj Nayak Feb 07 '13 at 06:10