• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: CoreData XML / SqLite differences
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData XML / SqLite differences


  • Subject: Re: CoreData XML / SqLite differences
  • From: Bill Bumgarner <email@hidden>
  • Date: Wed, 3 May 2006 20:08:35 -0700

On May 3, 2006, at 6:59 PM, Greg Hoover wrote:
I figured I'd test out the difference in speed between an xml persistent store and sql store. So using the sample Apple code, I migrated my existing XML store to SQL. Only after doing this I ran into a crop of exceptions. After a little digging I found that SQL stores have limitations in terms of multiple threads talking to them simultaneously. Has anyone else encountered this, and does anyone have a good workaround? It seems like for consistency, Apple would enforce the same thing on XML stores, no?

Actually, the XML store is atomic. So, every read and write read/ writes the entire store's contents from/to disk. The SQLite store is non-atomic, doing only the transactions necessary to read/write a subset of the store from/to disk.


Now, "SQL stores have limitations in terms of multiple threads talking to them simultaneously" sounds pretty scary.

What threading model are you using to manage access to Core Data? In particular, how many managed object contexts do you have.

(Hint: If the answer is "1 managed object context used across multiple threads", the answer will be that your code isn't doing threading correctly.)

b.bum
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: CoreData XML / SqLite differences
      • From: Greg Hoover <email@hidden>
References: 
 >CoreData XML / SqLite differences (From: Greg Hoover <email@hidden>)

  • Prev by Date: Re: Font Size Problem in NSTableView
  • Next by Date: In-Cell editing
  • Previous by thread: CoreData XML / SqLite differences
  • Next by thread: Re: CoreData XML / SqLite differences
  • Index(es):
    • Date
    • Thread