开发者

XML vs. Array in Flash

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 performa开发者_高级运维nce. 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)?


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜