I want to use RestKit to parse XML data from our servers. Downloading and parsing takes 2-3 seconds with our current approach using TBXML. However, when I now download and parse the same XML using RestKit + CoreData it takes ~ 10 seconds. Which is way too much in our case since it would drastically affect the end user experience.
The XML has a size of 1.3 MB and I convert the XML to two entities with the following attributes:
Parent:
- 3 string attributes
- 1 Integer32 attribute
Nested Object:
- 2 date attributes (With a custom Date formatter assigned to the mapping:
yyyy-MM-dd HH:mm:ss'Z') - 2 string attributes
Is there a way with which I could boost the performance of my setup and is the trade-off of CoreData quite big so that it might make sense to only use RestKit without CoreData.
You are comparing apples to oranges. Downloading and parsing with TBXML is doing significantly less than RestKit + CoreData, which is downloading, parsing, dynamically mapping to objects and storing to CoreData.
This article gives a good overview of the performance characteristics of various XML parsers running on iOS devices. TBXML is the fastest, with libxml2 DOM parsing about 20% slower.