1

I am looking for general optimization tips and guidelines for xml parsing.

One of the optimization strategies is of course selecting the "right" parser. A detailed comparison between the available parsers for ios can be found here http://www.raywenderlich.com/553/how-to-chose-the-best-xml-parser-for-your-iphone-project.

However, I am currently trying to investigate general guidelines and tips on how to optimize by payloads to increase the performance as possible.

This question is similar to (a question I have posted in the context of ios) but I have not got a sufficient answer. So this question is not in the context of any particular programming language.

1
  • 1
    Is your XML doc structure fixed, or do you have some freedom to change it? How big are they, and how many files you have to process? Do you must process them sequentially or one-by-one? What are your performance expectations, and what performance do you have today? If you want to get useful answers about performance, you should provide such details.
    – Doc Brown
    Commented Jun 13, 2012 at 17:50

1 Answer 1

1

Firstly, do you need to use XML? Or can you go with the more compact JSON format?

Another design principle is that you often don't need to send an entire document, just a snippet - you want to do as little serialising/de-serialising as possible.

If you're really looking into this in depth you can start investigating things like the shape/size of network packets and aligning your data to that etc.

2
  • I am actually bound to using xml in this particular case. I am not sure if json is always better in performance (edwardawebb.com/tips/xml-json). Commented Jun 13, 2012 at 10:43
  • It's certainly not always better no, "Measure, don't guess" is the mantra to follow here. Commented Jun 14, 2012 at 9:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.