• 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: Attr. uniqueness, Multithreading
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData: Attr. uniqueness, Multithreading


  • Subject: Re: CoreData: Attr. uniqueness, Multithreading
  • From: Scott Stevenson <email@hidden>
  • Date: Mon, 14 Nov 2005 18:32:50 -0800


On Nov 14, 2005, at 2:59 PM, Marc Monguio wrote:

The first one is perfomance. I have one entity with a path attribute which I want to be unique. To do so, before I add a new row into the entity I fetch for that path in the database if there's not any I add the new row with the path information.

What does the code for the uniqueness check look like?


The firsts inserts are quite fast but as long as the db increases it's size it's slower and slower.
I've tried to use the undocumented feature shown in this list for indexing properties (_NSCreateIndex) but it works as slow as before. Maybe is that I'm not doing in correctly, is it ?

I believe indexes will slow inserts.


The second problem I'm facing right now is that my application uses one thread to populate the entity with paths and other information.
Meanwhile through the UI users can be able to add more stuff in the entity. Everytime there's a fetch the applications throws an exception saying:

Instead of entity do you mean managed object? Not trying to nitpick, just trying to be clear.


The entity is just the abstract definition of a particular *kind* of object.


An uncaught exception was raised
2005-11-14 12:52:58.162 Test[16594] _obtainOpenChannel -- NSSQLCore 0x4044750: no database channel is available
2005-11-14 12:52:58.163 Test[16594] *** Uncaught exception: <NSInternalInconsistencyException> _obtainOpenChannel -- NSSQLCore 0x4044750: no database channel is available

I'm not familiar with this particular error, but how have you setup your threads? Do you have one context per thread? Are you passing objectIDs between them?



- Scott

--
http://theocacao.com/


_______________________________________________ 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
References: 
 >CoreData: Attr. uniqueness, Multithreading (From: Marc Monguio <email@hidden>)

  • Prev by Date: Re: xcode 2.2 coredata accessors
  • Next by Date: Re: xcode 2.2 coredata accessors
  • Previous by thread: CoreData: Attr. uniqueness, Multithreading
  • Next by thread: Delete Character keydown event
  • Index(es):
    • Date
    • Thread