title: How to solve the XML parsing performance issue on Android
body: <p>I have to read a XML file with about ~4000 lines on Android. First I tried the <a href="http://simple.sourceforge.net/" rel="nofollow noreferrer">SimpleXML library</a> because it's the easiest and it took about 2 minutes on my HTC Desire. So I thought maybe SimpleXML is so slow because of reflection and all the other magic that this library uses. I rewrote my parser and used the built-in DOM parsing method with some special attention for performance. That helped a bit but it still took about 60 seconds which is still totally unacceptable. After a bit of research I found <a href="http://www.developer.com/ws/article.php/10927_3824221_2/Android-XML-Parser-Performance.htm" rel="nofollow noreferrer">this article on developer.com</a>. There are some graphs that show that the other two available methods - the SAX parser and Android's XML Pull-Parser - are equally slow. And at the end of the article you'll find the following statement:</p>
  
  <blockquote>
    <p>The first surprise I had was at how slow all three methods were. Users
    don't want to wait long for results on mobile phones, so parsing
    anything more than a few dozen records may mandate a different method.</p>
  </blockquote>
  
  <p>What might be a "different method"? What to do if you have more than "a few dozen records"? </p>