• 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
Core Data fetch performance, design pattern sought
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Data fetch performance, design pattern sought


  • Subject: Core Data fetch performance, design pattern sought
  • From: "Sean McBride" <email@hidden>
  • Date: Thu, 2 Sep 2010 17:46:11 -0400
  • Organization: Rogue Research Inc.

Hi all,

I have 2 CoreData entities, Foo and Bar.  Both have 'name' string
attributes.  There are textfields allowing the user to rename any Foo
and any Bar.  Assume no 2 Foos can have the same name; likewise for
Bars.  There is a relationship between Foo and Bar.  I want a Foo to be
related to a Bar if and only if their names match.  That is, when the
user renames a Foo (or a Bar), I want to add/break a relationship
between the Bar (or Foo) of the same name.

Up to now I've done this by implementing Foo's setName: to 1) change
self's name and 2) fetch Bars of the same name.  Likewise for Bar.  This
works.  But it's slow if a single user action changes many names at once
because many redundant fetches are performed.

Any suggestions on a good pattern to solve this?

Thanks,

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

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: Core Data fetch performance, design pattern sought
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: CALayer -drawInContext and GCD
  • Next by Date: UIView animation
  • Previous by thread: Re: [NSTextView] Is there a workaround for Snow Leopard new word selection behavior/bug?
  • Next by thread: Re: Core Data fetch performance, design pattern sought
  • Index(es):
    • Date
    • Thread