This content has been marked as final. Show 8 replies
don't use one for-loop. break it into several for-loops that allow the stage to be updated between the various for-loops.
I am not too sure what you mean by "emp name." Please clarify.
It sounds like you have some characters in an XML file that need to be reparsed, i.e. converted before the data can become usable, and you're saying that this XML parsing is slowing down your application? Unless you've got over 20,000 entries, I doubt parsing alone will introduce a significant delay, so the problem might be in your code, maybe you're attempting to use recursive functions and things are getting locked in a loop? Also, post a bit of code using the Attach Code button, and let's see what you're looking at.
This is the structure i am using in my code..
how could i solve this issue...
I suspect its not the for loop that's slow. It could be the original parsing or the XPath filtering.
Kglad ,very nice way of coding... but i am facing some problem in implemetion the code....
bcoz, i need to attach the code in Action Script file
This part doesn't seem to make sense to me:
var __SeatingDetails:XML = new XML();
I would think that all you need is :
For the timing parts.... if I were you I would double check that the problem is really with your loop by wrapping some of the key things you're doing with getTimer() checks to be certain which part is the real bottleneck.
Here's an example for me, using a 3 year old laptop (that badly needs replacing). It took around 17 ms to process the 700 nodes in the way that you're doing.
I would check
a) xml loadTime
b) xml parsing Time (optional:you could do this by using onData if you want to and then calling onLoad)
d) looping for string creation and array.push
Kglad i'm facing some problem impleming your code to my file...
1) this.startInd is less than endIndex means then it moves to else function and call the forLoopFfunction
but it's move the else function after than it's not pass the parameter
forLoopF(this.startInd, this.endInd, node_xml);