I used a simple XML parser, using the official Android manual on XmlPullParser , to XmlPullParser very simple and short XML file (120 lines, 10.5Kb). On my HTC One X running Android 4.1.1, it takes a fraction of a second to analyze it. But on my HTC Hero running Android 2.1, it took more than 3 minutes ...
I know that the hardware between 2 is very different, but 3 minutes for such a small file? This is unacceptable ... Especially since XmlPullParser is available with API 1, it makes no sense to be so slow.
To try to identify the problem, I went through the analysis code step by step. And I noticed that nextTag() is the one that takes a very long time to process, everything else seems very fast. Dunno if this is the only problem or not ...
Any ideas how I can fix this?
source share