Skip to main content
September 12, 2010
Question

Default timeout of 15 seconds

  • September 12, 2010
  • 2 replies
  • 12281 views

Hi guys,

I'm facing this problem of default timeout of 15seconds, I'm running a loop, but it is not an infinite loop. It just takes very long to process and this error will occur. How do I go about solving it?

    This topic has been closed for replies.

    2 replies

    ozDiGennaro
    Participating Frequently
    September 17, 2010

    I found that I can use the full 60 seconds if I control the build option, using Flash Builder 4 (or maybe 3 too):

    http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_14.html

    "I put this in the 
    Project Properties|Compiler Options>Additional Compiler Options field: -default-script-limits 1000 60"

    Another good discussion:

    http://www.flashdevelop.org/community/viewtopic.php?f=13&t=2881

    September 12, 2010

    Anyone has this problem before and can help out on this?

    September 12, 2010

    you'll probably need to break the loop up into several parts.

    Do some of it, come out of it, then return. Flash really isn't that good at handling huge amounts of data as it's single threaded.

    you can find an example that does this here:

    http://www.switchonthecode.com/tutorials/flex-tutorial-an-asynchronous-jpeg-encoder

    September 12, 2010

    I tried using breaking and going in the loop, but still have the issue of the 15 seconds.

    I have an array length of 7000+ records.

    This is what I do:

    if(lengths>200)

    {

    var first:uint = lengths/2;

    for(var counter1:uint=0; counter1<first; counter1++)

    {

    //code logic here

    }

    for(var second:uint=lengths-first; second<lengths; second++)

    {

    //code logic here

    }

    }

    Is this what you are saying about going out and in the loop?