• 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: ordered and filtered fault efficiency
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ordered and filtered fault efficiency


  • Subject: Re: ordered and filtered fault efficiency
  • From: OC <email@hidden>
  • Date: Mon, 16 Feb 2015 09:52:13 +0100

Chuck,

On 16. 2. 2015, at 2:58, Chuck Hill <email@hidden> wrote:

> It would be very beneficial to speed up orderedPriceOffers ... It is used elsewhere too
...
> I was thinking more of fetch exactly what you need on demand than of caching.  You can cache, but at you note it gets very complicated quickly.

So, just plain ole

===
def orderedPriceOffers {
  return this.editingContext.objectsWithFetchSpecification( yadda yadda incl sort orderings )
}
===

nothing less, nothing more?

But that will do a DB round-trip each time it gets called, would it not? And well I did not benchmark (will do asap), but I understand that whilst the DB itself is very fast, those round-trips are expensive, and it is one of pretty important tasks of EOF to prevent them if possible?

> If you only need the single, most recent valid price, then fetch that.

As noted above, in different places I need both the ordered list (often) and the last valid price (VERY often, and often inside of a loop which makes some caching a must).

Nevertheless with the last valid thing I already took your advice and modelled it -- I dodged changing the DB for I was lucky and I happened to have in my model one legacy unused INTEGER attribute, which I used for a FK -- and preliminarily, it seems to work excellently.

Thanks a lot!
OC


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

This email sent to email@hidden


  • Follow-Ups:
    • relationship value different in another EC (was: ordered and filtered fault efficiency)
      • From: OC <email@hidden>
References: 
 >ordered and filtered fault efficiency (From: OC <email@hidden>)
 >Re: ordered and filtered fault efficiency (From: Chuck Hill <email@hidden>)
 >Re: ordered and filtered fault efficiency (From: OC <email@hidden>)
 >Re: ordered and filtered fault efficiency (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: ordered and filtered fault efficiency
  • Next by Date: Re: caching global IDs does not work as expected (followup: ordered and filtered fault efficiency)
  • Previous by thread: Re: ordered and filtered fault efficiency
  • Next by thread: relationship value different in another EC (was: ordered and filtered fault efficiency)
  • Index(es):
    • Date
    • Thread