开发者

Creating iOS giant drilldown menu from XML source. Will Core Data solve my SQLite loading time problems?

The core content of my iPhone app is a giant drilldown menu.

The data is coming from an XML document (it's a 1.2 MB file).

What would be the best way to implement the monster drilldown without making the user wait for the menu to load?

Putting this in an SQLite database and loading the menu at app launch isn't working. There's a 15 minute wait time.

In this post -- Core Data "Upsert" from SQLite Database -- someone wrote it was "typical to convert all your data to Core Data during development and then ship the app with a pre-populated Core Data store (no need for a user to wait for an import)."

Makes sense but the only rub with my app is I need to update this drilldown menu once every 6 weeks or so. Initially, we were going to host the XML on the Web and just send that out to the devices so an app update download wouldn't be required.

But it seems, given the size of the data, that this strategy in untenable.

I've seen good things written about Core Data on here. Is that going to solve the problem? I just want to avoid any loading time. If that means updating the menu with app updates - pre-populating a database - so be it.

Thanks for any pointers in the right direction.

More Info: Below is the format of my XML. Selecting any particular child item in a parent menu category will result in 1 of 6 values being output by the program (depending on buttons that the user has selected). That's part of why the XML is so large.

<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>Chi开发者_如何转开发ld 1 Pick F</value>
</item>


There are probably a few solutions that could work. It is difficult to be certain without more information and some testing.

First, as jrtc27 points out, maybe you could load the menus separately (could you use many separate small XML files)?

Otherwise, you won't know for sure until you try, but a pre-populated Core Data database may solve all your problems. It may require some restructuring of your data model or it may not.

Are the six week updates significant overhauls? If not, you should be able to issue them over a web service by updating the small XML files OR the Core Data database.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜