Good afternoon (depending on where you live)
I am new to Android development and am currently working on porting functionality from an existing iOS application to Android. Part of this function is the analysis of the "large" (~ 13,000 lines) RSS XML file, which contains about 500 entries. I spent somewhere 10-15 hours researching parsing XML files on Android. And try out the basic XML parsers: DOM, SAX and Pull-parsing. Here are my results running inside the emulator on my inbox (32-bit version of Windows Vista, 2.2 GHz dual-core processor, 3 GB of RAM):
SAX: ~ 6: 00 minutes
Pull-Parsing: ~ 4: 00 minutes
DOM: More than 4:00 minutes, but not the time when I had this implementation.
I also tried this RSS reader from github, but it took> 10:00 minutes:
https://github.com/matshofman/Android-RSS-Reader-Library
The implementations for SAX, PP and DOM were taken from stackoverflow.com streams, so I feel pretty confident that I didnโt do anything non-standard in them (although I donโt), I decided to turn to a larger, more experienced crowd, so that get some ideas on what else i can try.
I have no control over the file format. If I implemented this pass-through, I would just write a web service that did all the hard work on the server and then send a small, compact JSON-serialized list. Instead, I have a 13K line file. :)
Any insight on what I can do? This seems to be a fairly common problem, but most of the answers just say to try one of the different core XML parsers. In my case, I tried all three, and even the fastest one seems too slow.
What am I doing wrong? Are there any usual โnewbiesโ problems that people usually encounter when parsing XML over the network on Android ???
Thanks in advance for any help you can provide!