Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

XML parsing very slow

Hi all, I have been trying to parse xml's which is more than just a simple rss feed using the kitchen sink sample but parsing the xml seems to take a lot of time. Looping through 44 records and creating tablerows with 7 labels in each row seems to be taking ages.

Does anyone know if using json will speed up this process or is there any other way of approaching this? the actual xml is very fast as it is cached on the server just the android emulator seems to take ages to parse it.

It will be unrealistic to develop realtime applications using Titanium framework if this is not handled by the framework. Has anyone else encountered this?

— asked April 18th 2010 by sanchit sharma
  • slow
  • xml
0 Comments

2 Answers

  • There seems to be issues in general with XML parsing, at least on the iPhone. Check out the kitchen sink demo under the platform tab in the emulator. Go into the XHR section, and then select XML data. It will probably load the first time, but if you go back, then click back in to xml data again, it will lock up the kitchensink app after a few tries.

    This is happening with my app…so now I have to figure out a different way (probably a DB) of getting data into my app so that it doesn't crash.

    — answered October 29th 2010 by Brian Wilhelm
    permalink
    1 Comment
    • I am seeing similar behavior with my app and the XML API I have built for the server. I think i am going to switch it over to JSON and see what I get

      — commented October 29th 2010 by Aaron Saunders
  • @Aaron - JSON is the way.

    — answered October 30th 2010 by Dan Tamas
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.