• 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: [SOLVED] Re: Sort problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [SOLVED] Re: Sort problem


  • Subject: Re: [SOLVED] Re: Sort problem
  • From: David Holt <email@hidden>
  • Date: Fri, 15 Apr 2005 15:22:38 -0700

Thanks Art,

You are right of course, the lastpost is recalculated for each topic with every screen refresh. I have never cached objects to date, so I will have to hit the books this weekend to learn about it. I appreciate the suggestion,

David

On 15 Apr 2005, at 2:52 PM, Art Isbell wrote:

On Apr 15, 2005, at 11:43 AM, David Holt wrote:

EOSortOrdering timeOrdering = EOSortOrdering.sortOrderingWithKey("lastPost.timestamp", EOSortOrdering.CompareDescending);

If I understand your application logic correctly, each time you invoke lastPost() as occurs in the above sort, the last post for each Topic will be recomputed which might be expensive. You might want to consider caching the last post to avoid unnecessary recomputations. When a new post is added to a Topic, you could either set it to be the last post (if that makes sense) or set the cached last post to null so lastPost() will recompute it.


Aloha,
Art

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


This email sent to email@hidden


_______________________________________________ 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
References: 
 >Re: Sort problem (From: David Holt <email@hidden>)
 >[SOLVED] Re: Sort problem (From: David Holt <email@hidden>)
 >Re: [SOLVED] Re: Sort problem (From: Art Isbell <email@hidden>)

  • Prev by Date: Re: [SOLVED] Re: Sort problem
  • Next by Date: Re: Tab separated text input
  • Previous by thread: Re: [SOLVED] Re: Sort problem
  • Next by thread: Bi-directional One-to-one relationship
  • Index(es):
    • Date
    • Thread