• 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: Quickly remove contents from NSArrayController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Quickly remove contents from NSArrayController


  • Subject: Re: Quickly remove contents from NSArrayController
  • From: Jeff LaMarche <email@hidden>
  • Date: Mon, 24 Mar 2008 10:21:06 -0400

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 ?
_______________________________________________

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: Quickly remove contents from NSArrayController
      • From: Martin Linklater <email@hidden>
References: 
 >Quickly remove contents from NSArrayController (From: Martin Linklater <email@hidden>)

  • Prev by Date: Quickly remove contents from NSArrayController
  • Next by Date: Re: Interface Builder (almost) supports NSToolbar
  • Previous by thread: Quickly remove contents from NSArrayController
  • Next by thread: Re: Quickly remove contents from NSArrayController
  • Index(es):
    • Date
    • Thread