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

Re: sorting large tables


  • Subject: Re: sorting large tables
  • From: Jens Alfke <email@hidden>
  • Date: Thu, 13 Mar 2008 15:24:59 -0700


On 13 Mar '08, at 1:42 PM, Daniel Child wrote:

That makes a lot of sense to me, and that's the situation I'm trying to get to. But right now all I have is the original (unsorted) raw data. So I need to load it into memory and sort it.

You don't necessarily need to sort all of it at once. You just need to find the first few items, to display in your table view. If the user scrolls past those, you need to find more. You can do this by streaming the data from a file, keeping only the number of items you need in memory at once. This sort of task is typically called "external sorting", and Knuth and most other algorithm texts talk about it.


But that said, the sort you're doing shouldn't freeze or crash, not unless you eat up your processes' entire address space or use up so much VM that the system starts to thrash. You'll have to provide more details of what's happening.

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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: Daniel Child <email@hidden>
References: 
 >Re: sorting large tables (From: Daniel Child <email@hidden>)

  • Prev by Date: Re: Multiple downloads crash in Leopard
  • Next by Date: Re: Best Way To Lookup From a Huge Table
  • Previous by thread: Re: sorting large tables
  • Next by thread: Re: sorting large tables
  • Index(es):
    • Date
    • Thread