views:

138

answers:

2

In manipulating data in Flash, which data format gives faster speeds in terms of searching and manipulation, XML or nested associative arrays? Meaning I currently send data in strings into the Flash client (I don't want to load an XML file) but I'm not sure if formatting the data into an XML file or into nested associative arrays is better in terms of performance. What about data size? Does formatting the data in XML result in smaller or larger data size (which ultimately contributes to the size of the flash client file)?

A: 

That would depend on your data. If your data is very huge, xml would be faster, but if ur data is small, u can use array.

smartbear
+1  A: 

The best way to answer this question for yourself is to perform a benchmark. Perform some operations on your data in a loop and record the begin and end times. I have the feeling you'll find that arrays will perform better because XML needs to be parsed before the data inside can be used. But you should definitely do the benchmark to verify.

Asaph