Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 07-23-2011, 08:02 PM   #1 (permalink)
Registered Member
 
Join Date: Jul 2011
Posts: 3
redkronos2 is on a distinguished road
Default Core Data vs. SQLite vs. ?

Hi,

My app includes a large drilldown menu the content of which originated in XML.
Each menu item results in 1 of 6 possible values when selected by the user. Here's the format:

<item style="TEXTStyle4">
<value>PARENT CATEGORY NAME
<value/>
<value/>
<value/>
<value/>
<value/>
<item style="TEXTStyle5">
<value>Child 1 Pick A</value>
<value>Child 1 Pick B</value>
<value>Child 1 Pick C</value>
<value>Child 1 Pick D</value>
<value>Child 1 Pick E</value>
<value>Child 1 Pick F</value>
</item>

The XML is huge. The team's first approach was to load this into an SQLite database. But, at launch, the load is taking 15 minutes.

Obviously, a new approach is needed. Any ideas?

The Core Data approach is in memory, right? So if we use that there should be no loading time, I hope

The concern is how easily the app will be to update with Core Data, since the XML will be modified every 2 months or so.

Thanks for any advice.
redkronos2 is offline   Reply With Quote
Old 07-23-2011, 10:07 PM   #2 (permalink)
Cocoa Junkie
 
Duncan C's Avatar
 
Join Date: Dec 2008
Location: Northern Virginia
Posts: 6,003
Duncan C has a spectacular aura about
Default

Quote:
Originally Posted by redkronos2 View Post
Hi,

My app includes a large drilldown menu the content of which originated in XML.
Each menu item results in 1 of 6 possible values when selected by the user. Here's the format:

<item style="TEXTStyle4">
<value>PARENT CATEGORY NAME
<value/>
<value/>
<value/>
<value/>
<value/>
<item style="TEXTStyle5">
<value>Child 1 Pick A</value>
<value>Child 1 Pick B</value>
<value>Child 1 Pick C</value>
<value>Child 1 Pick D</value>
<value>Child 1 Pick E</value>
<value>Child 1 Pick F</value>
</item>

The XML is huge. The team's first approach was to load this into an SQLite database. But, at launch, the load is taking 15 minutes.

Obviously, a new approach is needed. Any ideas?

The Core Data approach is in memory, right? So if we use that there should be no loading time, I hope

The concern is how easily the app will be to update with Core Data, since the XML will be modified every 2 months or so.

Thanks for any advice.
Core data is a smart object front end on top of a "backing store" that can be XML, plists, or SQLite.

For very large databases, you would want the SQLite option.

Core Data is pretty smart about not loading actual records until it must. At first, it loads a placeholder that it calls a "fault". Its only when you actually fetch one of the fields of a record that it loads the record itself. This makes it both fast and easy on memory.

I'd suggest trying Core Data with an SQLite back-end. It's not magic, but it is pretty well optimized.
__________________
Regards,

Duncan C
WareTo

Check out our apps in the Apple App store


Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.

See this tutorial on using UIView animations and layer animations:

See this thread on generating random, non-repeating text

Check out a very cool Macintosh Kaleidoscopes app called ScopeWorks that we released to the Mac App store.
Duncan C is offline   Reply With Quote
Old 07-23-2011, 10:40 PM   #3 (permalink)
Registered Member
 
Join Date: Jul 2011
Posts: 3
redkronos2 is on a distinguished road
Default thanks

Ok, thanks Duncan. The fact that this menu is taking 15 minutes to load on initial launch and then 10 minutes on subsequent launches is a hint that they're probably not including the database "in memory" right?

Yeah, I've read elsewhere that Core Data with backing SQLite is the way to go. One fellow came just shy of calling it magic actually. But I don't want to get my hopes too high up.

I just hope it works. And I hope we haven't given an iOS app an impossible task


Quote:
Originally Posted by Duncan C View Post
Core data is a smart object front end on top of a "backing store" that can be XML, plists, or SQLite.

For very large databases, you would want the SQLite option.

Core Data is pretty smart about not loading actual records until it must. At first, it loads a placeholder that it calls a "fault". Its only when you actually fetch one of the fields of a record that it loads the record itself. This makes it both fast and easy on memory.

I'd suggest trying Core Data with an SQLite back-end. It's not magic, but it is pretty well optimized.
redkronos2 is offline   Reply With Quote
Reply

Bookmarks

Tags
core data, drilldown, sqlite, xml

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 406
17 members and 389 guests
7twenty7, blasterbr, buggen, chiataytuday, Clouds, dre, fiftysixty, HemiMG, jeroenkeij, jimmyon122, jonathandeknudt, LEARN2MAKE, n00b, nyoe, pungs, tymex, UMAD
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,668
Threads: 94,121
Posts: 402,901
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jonathandeknudt
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 03:58 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0