IE Error "Stop Running This Script"

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Sunny

    IE Error "Stop Running This Script"

    Hi,

    Sometime, when your script is too big,
    IE Gives you a warning "Stop Running This Script"
    A script on this page is causing Internet Explorer to run slowly.

    Does anyone knows, How to correct that?

    Thanks.
  • Conrad Lender

    #2
    Re: IE Error "Stop Running This Script"

    On 2008-10-20 20:19, Sunny wrote:
    Sometime, when your script is too big,
    IE Gives you a warning "Stop Running This Script"
    A script on this page is causing Internet Explorer to run slowly.
    >
    Does anyone knows, How to correct that?
    This is not IE-specific, it happens in all browsers. If a script is
    running non-stop for some time, for example because of an endless loop,
    (modern) browsers offer you a chance to interrupt it.

    If your script really has to work for a very long time, you could split
    up execution into smaller parts. For example, if you're doing protein
    folding calculations, or raytracing, or meteorological simulations with
    javascript in a browser[0], you could run $n iterations, then call
    setTimeout("con tinueCalculatio ns()", delay-in-ms) to do the next $n
    iterations. Repeat and rinse.

    ([0] There are actually at least two raytracing implementations in
    javascript. People are really going crazy these days. Not sure about the
    protein folding, but I wouldn't be surprised.)


    - Conrad

    Comment

    • David Mark

      #3
      Re: IE Error "Stop Running This Script"

      On Oct 20, 5:48 pm, Conrad Lender <crlen...@yahoo .comwrote:
      On 2008-10-20 20:19, Sunny wrote:
      >
      Sometime, when your script is too big,
      IE Gives you a warning "Stop Running This Script"
      A script on this page is causing Internet Explorer to run slowly.
      >
      Does anyone knows, How to correct that?
      >
      This is not IE-specific, it happens in all browsers. If a script is
      running non-stop for some time, for example because of an endless loop,
      (modern) browsers offer you a chance to interrupt it.
      >
      If your script really has to work for a very long time, you could split
      up execution into smaller parts. For example, if you're doing protein
      folding calculations, or raytracing, or meteorological simulations with
      javascript in a browser[0], you could run $n iterations, then call
      setTimeout("con tinueCalculatio ns()", delay-in-ms) to do the next $n
      Eval is evil.

      Comment

      • Thomas 'PointedEars' Lahn

        #4
        Re: IE Error &quot;Stop Running This Script&quot;

        David Mark wrote:
        On Oct 20, 5:48 pm, Conrad Lender <crlen...@yahoo .comwrote:
        >[...]
        >If your script really has to work for a very long time, you could split
        >up execution into smaller parts. For example, if you're doing protein
        >folding calculations, or raytracing, or meteorological simulations with
        >javascript in a browser[0], you could run $n iterations, then call
        >setTimeout("co ntinueCalculati ons()", delay-in-ms) to do the next $n
        >
        Eval is evil.
        There is some truth in this, but what does it have to do with what you quoted?


        PointedEars
        --
        var bugRiddenCrashP ronePieceOfJunk = (
        navigator.userA gent.indexOf('M SIE 5') != -1
        && navigator.userA gent.indexOf('M ac') != -1
        ) // Plone, register_functi on.js:16

        Comment

        • David Mark

          #5
          Re: IE Error &quot;Stop Running This Script&quot;

          On Oct 22, 2:57 pm, Thomas 'PointedEars' Lahn <PointedE...@we b.de>
          wrote:
          David Mark wrote:
          On Oct 20, 5:48 pm, Conrad Lender <crlen...@yahoo .comwrote:
          [...]
          If your script really has to work for a very long time, you could split
          up execution into smaller parts. For example, if you're doing protein
          folding calculations, or raytracing, or meteorological simulations with
          javascript in a browser[0], you could run $n iterations, then call
          setTimeout("con tinueCalculatio ns()", delay-in-ms) to do the next $n
          >
          You don't see that?

          Comment

          • Thomas 'PointedEars' Lahn

            #6
            Re: IE Error &quot;Stop Running This Script&quot;

            David Mark wrote:
            Thomas 'PointedEars' Lahn wrote:
            >David Mark wrote:
            >>On Oct 20, 5:48 pm, Conrad Lender <crlen...@yahoo .comwrote:
            >>>[...]
            >>>If your script really has to work for a very long time, you could split
            >>>up execution into smaller parts. For example, if you're doing protein
            >>>folding calculations, or raytracing, or meteorological simulations with
            >>>javascript in a browser[0], you could run $n iterations, then call
            >>>setTimeout(" continueCalcula tions()", delay-in-ms) to do the next $n
            >
            You don't see that?
            See what?


            PointedEars
            --
            Anyone who slaps a 'this page is best viewed with Browser X' label on
            a Web page appears to be yearning for the bad old days, before the Web,
            when you had very little chance of reading a document written on another
            computer, another word processor, or another network. -- Tim Berners-Lee

            Comment

            • David Mark

              #7
              Re: IE Error &quot;Stop Running This Script&quot;

              On Oct 22, 4:22 pm, Thomas 'PointedEars' Lahn <PointedE...@we b.de>
              wrote:
              David Mark wrote:
              Thomas 'PointedEars' Lahn wrote:
              David Mark wrote:
              >On Oct 20, 5:48 pm, Conrad Lender <crlen...@yahoo .comwrote:
              >>[...]
              >>If your script really has to work for a very long time, you could split
              >>up execution into smaller parts. For example, if you're doing protein
              >>folding calculations, or raytracing, or meteorological simulations with
              >>javascript in a browser[0], you could run $n iterations, then call
              >>setTimeout("c ontinueCalculat ions()", delay-in-ms) to do the next $n
              >
              You don't see that?
              >
              See what?
              >
              I guess you can't then (or you are being deliberately obtuse.)

              Comment

              • Thomas 'PointedEars' Lahn

                #8
                Re: IE Error &quot;Stop Running This Script&quot;

                David Mark wrote:
                Thomas 'PointedEars' Lahn wrote:
                >David Mark wrote:
                >>Thomas 'PointedEars' Lahn wrote:
                >>>David Mark wrote:
                >>>>On Oct 20, 5:48 pm, Conrad Lender <crlen...@yahoo .comwrote:
                >>>>>[...]
                >>>>>If your script really has to work for a very long time, you could split
                >>>>>up execution into smaller parts. For example, if you're doing protein
                >>>>>folding calculations, or raytracing, or meteorological simulations with
                >>>>>javascri pt in a browser[0], you could run $n iterations, then call
                >>>>>setTimeout ("continueCalcu lations()", delay-in-ms) to do the next $n
                >>You don't see that?
                >See what?
                >>
                >
                I guess you can't then (or you are being deliberately obtuse.)
                Or maybe you're imagining things plus you can't quote properly.
                There are just so many possibilities ...


                PointedEars
                --
                Prototype.js was written by people who don't know javascript for people
                who don't know javascript. People who don't know javascript are not
                the best source of advice on designing systems that use javascript.
                -- Richard Cornford, cljs, <f806at$ail$1$8 300dec7@news.de mon.co.uk>

                Comment

                • Rik Wasmus

                  #9
                  Re: IE Error &quot;Stop Running This Script&quot;

                  On Wed, 22 Oct 2008 22:22:35 +0200, Thomas 'PointedEars' Lahn
                  <PointedEars@we b.dewrote:
                  David Mark wrote:
                  >Thomas 'PointedEars' Lahn wrote:
                  >>David Mark wrote:
                  >>>On Oct 20, 5:48 pm, Conrad Lender <crlen...@yahoo .comwrote:
                  >>>>[...]
                  >>>>If your script really has to work for a very long time, you could
                  >>>>split
                  >>>>up execution into smaller parts. For example, if you're doing protein
                  >>>>folding calculations, or raytracing, or meteorological simulations
                  >>>>with
                  >>>>javascrip t in a browser[0], you could run $n iterations, then call
                  >>>>setTimeout( "continueCalcul ations()", delay-in-ms) to do the next $n
                  [unquoted]
                  David: Eval is Evil
                  Thomas: What has that got to do with it?
                  [/unquote]
                  >You don't see that?
                  >
                  See what?
                  Aside from the fact he should indeed have quoted the posts in between:

                  'setTimeout("co ntinueCalculati ons()",deal-in-ms)'

                  vs.

                  'setTimeout(con tinueCalculatio ns,deal-in-ms)'
                  --
                  Rik

                  Comment

                  • Conrad Lender

                    #10
                    Re: IE Error &quot;Stop Running This Script&quot;

                    On 2008-10-22 23:24, Thomas 'PointedEars' Lahn wrote:
                    >>>>>On Oct 20, 5:48 pm, Conrad Lender <crlen...@yahoo .com>
                    >>>>>wrote:
                    >>>>>>setTimeou t("continueCalc ulations()", delay-in-ms) to do
                    >>>You don't see that?
                    >>See what?
                    >I guess you can't then (or you are being deliberately obtuse.)
                    Or maybe you're imagining things [..]
                    I suppose Mark was referring to '"continueCalcu lations()"' vs
                    'continueCalcul ations', and he's correct, after a fashion. What I wrote
                    was just an example, but even so I should have used a function reference
                    instead of a string. I thought the string would be easier to understand
                    in this particular case. So, it's my fault - can we settle this now?


                    - Conrad

                    Comment

                    • David Mark

                      #11
                      Re: IE Error &quot;Stop Running This Script&quot;

                      On Oct 22, 7:41 pm, "Rik Wasmus" <luiheidsgoe... @hotmail.comwro te:
                      On Wed, 22 Oct 2008 22:22:35 +0200, Thomas 'PointedEars' Lahn
                      >
                      <PointedE...@we b.dewrote:
                      David Mark wrote:
                      Thomas 'PointedEars' Lahn wrote:
                      >David Mark wrote:
                      >>On Oct 20, 5:48 pm, Conrad Lender <crlen...@yahoo .comwrote:
                      >>>[...]
                      >>>If your script really has to work for a very long time, you could  
                      >>>split
                      >>>up execution into smaller parts. For example, if you're doing protein
                      >>>folding calculations, or raytracing, or meteorological simulations  
                      >>>with
                      >>>javascript in a browser[0], you could run $n iterations, then call
                      >>>setTimeout(" continueCalcula tions()", delay-in-ms) to do the next $n
                      >
                      [unquoted]
                      David: Eval is Evil
                      Thomas: What has that got to do with it?
                      [/unquote]
                      >
                      You don't see that?
                      >
                      See what?
                      >
                      Aside from the fact he should indeed have quoted the posts in between:
                      >
                      'setTimeout("co ntinueCalculati ons()",deal-in-ms)'
                      >
                      vs.
                      >
                      'setTimeout(con tinueCalculatio ns,deal-in-ms)'
                      Thank you Rik. And yes, as Thomas was sure to point out, I mis-quoted
                      one of the responses. And he knew what I was talking about all
                      along. Somebody is having a bad day.

                      Comment

                      • Dr J R Stockton

                        #12
                        Re: IE Error &quot;Stop Running This Script&quot;

                        In comp.lang.javas cript message <opadnezbeb83YW HVnZ2dnUVZ8umdn Z2d@supern
                        ews.com>, Mon, 20 Oct 2008 23:48:29, Conrad Lender <crlender@yahoo .com>
                        posted:
                        >On 2008-10-20 20:19, Sunny wrote:
                        >Sometime, when your script is too big,
                        >IE Gives you a warning "Stop Running This Script"
                        >A script on this page is causing Internet Explorer to run slowly.
                        >>
                        >Does anyone knows, How to correct that?
                        >
                        >This is not IE-specific, it happens in all browsers. If a script is
                        >running non-stop for some time, for example because of an endless loop,
                        >(modern) browsers offer you a chance to interrupt it.
                        In most applications, ISTM that running for long will be due to a bug,
                        and the usual pop-up continue/stop is therefore appropriate. But it
                        would probably be better if the code were to continue running
                        underneath, and it would also be well if one could choose to continue
                        longer before the next warning, or continue indefinitely. I often need,
                        in testing an algorithm, to loop more than 5,700,000 times.

                        I'd like a FAQ entry on control of this feature. though I suspect that
                        it's not commonly enough of interest. Browsers vary.

                        You and the OP seem to have omitted to mention 'eval', which makes David
                        Mark's follow-up appear somewhat inexplicable.

                        --
                        (c) John Stockton, nr London UK. ?@merlyn.demon. co.uk IE7 FF2 Op9 Sf3
                        news:comp.lang. javascript FAQ <URL:http://www.jibbering.c om/faq/index.html>.
                        <URL:http://www.merlyn.demo n.co.uk/js-index.htmjscr maths, dates, sources.
                        <URL:http://www.merlyn.demo n.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.

                        Comment

                        • Thomas 'PointedEars' Lahn

                          #13
                          Re: IE Error &quot;Stop Running This Script&quot;

                          David Mark wrote:
                          "Rik Wasmus" wrote:
                          >Thomas 'PointedEars' Lahn wrote:
                          >>David Mark wrote:
                          >>>Thomas 'PointedEars' Lahn wrote:
                          >>>>David Mark wrote:
                          >>>>>On Oct 20, 5:48 pm, Conrad Lender <crlen...@yahoo .comwrote:
                          >>>>>>[...]
                          >>>>>>If your script really has to work for a very long time, you could
                          >>>>>>split
                          >>>>>>up execution into smaller parts. For example, if you're doing protein
                          >>>>>>folding calculations, or raytracing, or meteorological simulations
                          >>>>>>with
                          >>>>>>javascrip t in a browser[0], you could run $n iterations, then call
                          >>>>>>setTimeou t("continueCalc ulations()", delay-in-ms) to do the next $n
                          >[unquoted]
                          >David: Eval is Evil
                          >Thomas: What has that got to do with it?
                          >[/unquote]
                          >>
                          >>>You don't see that?
                          >>See what?
                          >Aside from the fact he should indeed have quoted the posts in between:
                          >>
                          >'setTimeout("c ontinueCalculat ions()",deal-in-ms)'
                          >>
                          >vs.
                          >>
                          >'setTimeout(co ntinueCalculati ons,deal-in-ms)'
                          >
                          Thank you Rik. And yes, as Thomas was sure to point out, I mis-quoted
                          one of the responses. And he knew what I was talking about all
                          along.
                          No, you don't. eval() does not even enter into it.
                          Somebody is having a bad day.
                          Apparently, and it wasn't me.

                          Now that the point you tried to make can be clearly seen (why did you not
                          simply say so in the first place? Why all the pointless evading?), it can
                          be pointed out as clearly that you are utterly mistaken if you think that
                          the latter has an intrinsic benefit over the former here. In fact, strictly
                          speaking, the string value is even more compatible than the Function
                          reference as the first argument.


                          HTH

                          PointedEars
                          --
                          Use any version of Microsoft Frontpage to create your site.
                          (This won't prevent people from viewing your source, but no one
                          will want to steal it.)
                          -- from <http://www.vortex-webdesign.com/help/hidesource.htm>

                          Comment

                          • Thomas 'PointedEars' Lahn

                            #14
                            Re: IE Error &quot;Stop Running This Script&quot;

                            Conrad Lender wrote:
                            On 2008-10-22 23:24, Thomas 'PointedEars' Lahn wrote:
                            >>>>>>On Oct 20, 5:48 pm, Conrad Lender <crlen...@yahoo .comwrote:
                            >>>>>>>
                            >>>>>>>
                            >>>>>>>setTimeo ut("continueCal culations()", delay-in-ms) to do
                            >>>>You don't see that?
                            >>>See what?
                            >>I guess you can't then (or you are being deliberately obtuse.)
                            >Or maybe you're imagining things [..]
                            >
                            I suppose Mark was referring to '"continueCalcu lations()"' vs
                            'continueCalcul ations', and he's correct, after a fashion.
                            It was an inept attempt at tetrapilotomy, nothing more.
                            What I wrote was just an example, but even so I should have used a
                            function reference instead of a string.
                            Nonsense.
                            I thought the string would be easier to understand in this particular
                            case. So, it's my fault - can we settle this now?
                            Not before it was emphasized that you did not make a mistake at all.


                            PointedEars
                            --
                            realism: HTML 4.01 Strict
                            evangelism: XHTML 1.0 Strict
                            madness: XHTML 1.1 as application/xhtml+xml
                            -- Bjoern Hoehrmann

                            Comment

                            • Andrew Poulos

                              #15
                              Re: IE Error &quot;Stop Running This Script&quot;

                              Thomas 'PointedEars' Lahn wrote:
                              It was an inept attempt at tetrapilotomy, nothing more.
                              Its spelt "tetrapylot omy" :-)

                              Andrew Poulos

                              Comment

                              Working...