• 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: narraycontroller sort performance problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: narraycontroller sort performance problems


  • Subject: Re: narraycontroller sort performance problems
  • From: Richard <email@hidden>
  • Date: Thu, 17 Dec 2009 20:30:32 +0100

jens, this sounds reasonable, i will give it a try.

mike, i did give it a shot in instruments, comparing the same search with
and without sorting. i'm not really sure what to make of the results
however. when sorting is enabled, nearly all the execution time is taken up
with [NSArrayController setContent:] with the time shared evenly over
[NSObject removeObserver] and [NSObject addObserver], with only a small
fraction of the time taken up by actual sorting.

so, it would seem that the extra workload is in the array controller
stopping observing the old content, then reobserving the new content. not
sure what can be done to alleviate this, any suggestions?

On Thu, Dec 17, 2009 at 5:50 PM, Mike Abdullah <email@hidden>wrote:

> As with every performance question. Don't "assume", MEASURE. Fire up
> Instruments and find out what is using up the CPU.
>
> On 17 Dec 2009, at 15:22, Richard wrote:
>
> > hey
> >
> > i have an app that performs searches over a network connection. the app
> uses
> > core data to manage all the search requests (currently using an in memory
> > store), with an array controller and table view bound to the relevant
> > results. a search query produces up to about 10000 results, and they are
> > added to the data model in batches of 10 or so. this all works well,
> until i
> > add sorting to the array controller. i then find that the CPU use of the
> > application stays at 100% and things go pretty slowly from that point on.
> >
> > i assume this is because with each new search result that is being
> retrieved
> > and added to the core data model, the array controller is resorting the
> > entire collection of search results? can anyone suggest a solution to
> this
> > problem?
> >
> > thanks
> > _______________________________________________
> >
> > 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
>
>
_______________________________________________

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: narraycontroller sort performance problems
      • From: Mike Abdullah <email@hidden>
References: 
 >narraycontroller sort performance problems (From: Richard <email@hidden>)
 >Re: narraycontroller sort performance problems (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Re: Overriding NSArrayController to be used in a many-to-many RS and NSTable Bindings
  • Next by Date: Re: Call Cocoa from C++
  • Previous by thread: Re: narraycontroller sort performance problems
  • Next by thread: Re: narraycontroller sort performance problems
  • Index(es):
    • Date
    • Thread