FROM : Jeff LaMarche
DATE : Mon Mar 24 15:21:06 2008
I would think that
[itemBrowserArrayCTRL removeAllObjects];
would be your best. By calling arrangedObjects and feeding it to
removeObjects:, you're causing your array to sort all 15000 entries
before it removes them individually.
HTH
Jeff
On Mar 24, 2008, at 10:16 AM, Martin Linklater wrote:
> HI. I have an NSArrayController which has over 15000 entries. When I
> clear the array using
>
> [itemBrowserArrayCTRL removeObjects:[itemBrowserArrayCTRL
> arrangedObjects]];
>
> it takes a long time... like 10+ seconds on my MacBook Pro.
>
> Is there a quicker way of clearing the contents ?
DATE : Mon Mar 24 15:21:06 2008
I would think that
[itemBrowserArrayCTRL removeAllObjects];
would be your best. By calling arrangedObjects and feeding it to
removeObjects:, you're causing your array to sort all 15000 entries
before it removes them individually.
HTH
Jeff
On Mar 24, 2008, at 10:16 AM, Martin Linklater wrote:
> HI. I have an NSArrayController which has over 15000 entries. When I
> clear the array using
>
> [itemBrowserArrayCTRL removeObjects:[itemBrowserArrayCTRL
> arrangedObjects]];
>
> it takes a long time... like 10+ seconds on my MacBook Pro.
>
> Is there a quicker way of clearing the contents ?
| Related mails | Author | Date |
|---|---|---|
| Martin Linklater | Mar 24, 15:16 | |
| Jeff LaMarche | Mar 24, 15:21 | |
| Martin Linklater | Mar 24, 15:26 | |
| Jeff LaMarche | Mar 24, 15:35 | |
| Kyle Sluder | Mar 24, 15:42 | |
| Martin Linklater | Mar 24, 23:15 |






Cocoa mail archive

