• 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
sorting large tables
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

sorting large tables


  • Subject: sorting large tables
  • From: Daniel Child <email@hidden>
  • Date: Thu, 13 Mar 2008 11:52:13 -0400

Hi,

I am using sortArrayUsingFunction: context: to sort a fairly large table (100k recs). Judging from the readout of comparisons being made the sort appears to be about 80% done when everything comes to a halt. No message, no nothing. It just stops.

The exact same function works if the table is about half that size (about 55k). I tried throwing in a couple of autorelease pools to minimize any buildup of temporary objects, and that got me a little further, but still not all the way. Since I may eventually need to deal with a million records, I'm suspecting this is not a viable approach.

Unfortunately, the table is not KVO-compliant so I cannot use NSSortDescriptor. And I need to pass the primary and secondary sort fields at runtime, so I cannot use sortUsingSelector since it takes no parameters.

I'd really appreciate suggestions on how to 1) get through this file using the function I set up and 2) ideas on alternative approaches that will be able to handle much larger files for the future.

Thanks!
Daniel
_______________________________________________

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: sorting large tables
      • From: Keary Suska <email@hidden>
    • Re: sorting large tables
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: runtime error (-> ObjectAlloc)
  • Next by Date: Re: sorting large tables
  • Previous by thread: Re: AppleScript Support with Plugin
  • Next by thread: Re: sorting large tables
  • Index(es):
    • Date
    • Thread