I have a method, which connects to a HTTP server and requests via XMLRPC, a list of data structures and then for each data structure gets a list of attributes and the values of those attributes. It's implemented using nested for each
loops.
The problem is that it's loading a lot of data all at once, and consuming a massive amount of CPU (over 100%) reading responses from the server and parsing the XML.
If I were writing the program in C, I'd insert a usleep()
at the end of the loop, to wait before trying to load more data and reduce CPU usage. What would the equivalent be in Flex?