25

I am wondering if anyone has any real world numbers on performance differences between an old sqlite application which has been converted to Core Data in the 3.0 SDK.

I suspect that under the hood Core Data is just using sqlite anyways and that it add's a bit of overhead for the cost of convenience, but i thought i would ask anyways.

Grouchal
9,8276 gold badges36 silver badges46 bronze badges
asked Jun 25, 2009 at 17:35
1
  • 3
    There's no need to "suspect" this. It's very clearly stated in the documentation that you have the option of a SQLite store. Commented Jun 26, 2009 at 9:46

2 Answers 2

39

Core Data is heavily optimized with regards to caching, lazy-loading and memory management.

If you use it (with the SQLite store type), especially in conjunction with NSFetchedResultsController, you should get better performance than you could get with SQLite on your own.

Apple has worked hard to make Core Data perform well on the iPhone. My application switched from SQLite w/ FMDB to Core Data and it is now faster and more stable with less code.

answered Jun 25, 2009 at 18:41
Sign up to request clarification or add additional context in comments.

3 Comments

I was of the common impression that Core Data would just add overhead to SQLite, but I was shown that everything you describe is true. In fact, I believe the iPhone's address book is now based on Core Data in 3.0. That's a pretty strong vote of confidence.
I believe the iPod app now is as well.
thanks for a great answer, backed by personal experience vs. theoretical type jargon.
2

Core Data can use sqllite - it is up to the developer to configure - so your suspect correctly. On the Phone I would suggest sqllite is the best idea.

I think one of the biggest benefits you can gain by using Core Data is the lazy loading of data and the faulting to save on memory. So you need to also think about things like this when you are considering performance as the amount of free memory you have will also impact performance.

answered Jun 25, 2009 at 17:50

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.