• 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
CoreData: Preventing fault firing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CoreData: Preventing fault firing


  • Subject: CoreData: Preventing fault firing
  • From: Brad Miller <email@hidden>
  • Date: Mon, 23 Jul 2007 21:17:42 -0700

Hi,

Is there anyway to prevent an object from firing faults? I've run into a fairly big slowdown in my app due to relationships being fetched that don't need to be. In my case I have a background operation that fetches a group of objects, sets an int value in them, and then terminates. When I set the value, the 4 many-to-many relationships that the object has are each being fired in separate sql queries which according to the sql logging adds about .0016 sec. The operation could be over a few thousand objects, so that time adds up quick.

The function that's running looks like (pseudo code here to keep it short):

- (void)updateObjects
{
	NSArray *objects = results from a fetch request

	foreach(object in objects)
		[object setValue:[NSNumber numberWithInt:1] forKey:@"theKey"];
}

I've confirmed that the faults are being fired when the serValue is executed by adding logging around the call. There is no UI for the operation that might be triggering them either.

Thanks,

Brad

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: CoreData: Preventing fault firing
      • From: Chris Ridd <email@hidden>
  • Prev by Date: Re: Unique Set of n Colors
  • Next by Date: Re: Saving images to MySQL
  • Previous by thread: How should my controller objects reference eachother?
  • Next by thread: Re: CoreData: Preventing fault firing
  • Index(es):
    • Date
    • Thread