2 Replies Latest reply on Jan 24, 2008 9:06 AM by jfizer

    Looping over very large XML data nodes VS Script timeout errors.

    jfizer Level 1
      I have a very large data set (240,000+ rows) that I need to do some calculations on. The data is in XML format and I need to find each instance where an XML value equals a string and pull another value for a calculation.

      So, from the XML listed I would like to find all instances where val1==One and run a calculation based on val2. I've been trying various E4X methods, and while they work great for pulling a single value out they dont seem to work for returning a range of values. Whats more, I cant just loop over the whole mess due to the script execution timeout limits in Flex.

      Any ideas?
        • 1. Re: Looping over very large XML data nodes VS Script timeout errors.
          Mihai Corlan Adobe Employee
          Hi jfizer,

          When you say "they dont seem to work for returning a range of values." you mean you tried this:

          var myList:XMLList = myXml.data.(val1=="one" || var1 == "Two");

          On the other hands maybe it is a good idee with such a big XML to handle the calculations on server side.



          regards,
          Miha Corlan
          • 2. Re: Looping over very large XML data nodes VS Script timeout errors.
            jfizer Level 1
            Sorry, wasn't very clear. Something like var myList:XMLList = myXml.data.(val1=="one" || var1 == "Two"); will work, however they seem to take almost as much time to execute as just doing a for loop over the whole mess and comparing each value in turn. Meaning that they still generate time outs. What I'm finding is that the 60 second max script execution time is just not long enough to process hundreds of thousands of records. And in this case, each records value is dependant on every other record, so I cant batch process it very easy.