• 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: Greg Hoover <email@hidden>
  • Date: Wed, 3 May 2006 22:02:07 -0700


On May 3, 2006, at 8:08 PM, Bill Bumgarner wrote:

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



Thanks for the tip. I found the Apple doc related to this. I realize now that I didn't have an issue with XML stores because the data is read into memory.


Thanks.
-GH
_______________________________________________
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: Bill Bumgarner <email@hidden>
References: 
 >CoreData XML / SqLite differences (From: Greg Hoover <email@hidden>)
 >Re: CoreData XML / SqLite differences (From: Bill Bumgarner <email@hidden>)

  • Prev by Date: In-Cell editing
  • Next by Date: Re: Cocoa & Java on Intel fails with "Java for ppc cannot run in this configuration"
  • Previous by thread: Re: CoreData XML / SqLite differences
  • Next by thread: Re: CoreData XML / SqLite differences
  • Index(es):
    • Date
    • Thread