Having implemented the import based on the SAX parser now, using Androids infrastructure for unit testing, I could easily compare the two implementations through this UnitTest, and come up with a measurement of how they perform when confronted with large files. The table lists the time the test needs to run when parsing the files with SAX or DOM on a Google Nexus S:
| FileSize | SAX | DOM |
|---|---|---|
| 1M | 0,755 | 4,934 |
| 2M | 1,475 | 8,335 |
| 4M | 3,019 | 19,347 |
| 6M | 4,756 | OutOfMemoryError |
No comments:
Post a Comment