Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

share|improve this question
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 Jun 13 '12 at 17:50
add comment

1 Answer

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.

share|improve this answer
    
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). –  Future2020 Jun 13 '12 at 10:43
    
It's certainly not always better no, "Measure, don't guess" is the mantra to follow here. –  Martijn Verburg Jun 14 '12 at 9:02
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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