Re: narraycontroller sort performance problems

2009-12-18 Thread Richard
hey mike the final thought put me on to an easy solution, thanks. i just stopped the controller automaticallly rearranging the content, then called [arrayController rearrangeContent] after a batch of search results has arrived. it still is quite heavy on the processor, but the results arrive in a

narraycontroller sort performance problems

2009-12-17 Thread Richard
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 1 results, and they are

Re: narraycontroller sort performance problems

2009-12-17 Thread Jens Alfke
On Dec 17, 2009, at 7:22 AM, Richard wrote: 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? I've run into

Re: narraycontroller sort performance problems

2009-12-17 Thread Mike Abdullah
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

Re: narraycontroller sort performance problems

2009-12-17 Thread Richard
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

Re: narraycontroller sort performance problems

2009-12-17 Thread Mike Abdullah
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

Re: narraycontroller sort performance problems

2009-12-17 Thread Mike Abdullah
Aha, now we're talking! So the problem is that after ever change to your model, the controller must rearrange its content to match. It knows the change is needed because it receives a Key-Value Observing notification of the change. It's got no way to know that more changes are about to happen