IIRC, the insertion sort is a stable sort (it doesn't move records that don't
need to move), so it's convenient if you have 2-level sorts (ex. by name, then
by first name).
But whichever sort I use, sorting 30000 items takes times, and this can be
annoying when the user triggers the sort accidentally by mis-tapping on the
column header.
InsertionSort is best used with an already sorted list, where you're
just adding a few items to it. It performs very poorly with a list of
randomly ordered items, working on O(n^2) time. It's in Palm OS
because that's the common situation for reordering alarms after a
change in the datebook.
In your situation, it's probably best to implement a shell sort that
will run in O(n log n) time. You also could use QuickSort and provide
a sorting routine that works on multiple fields at once to give your
complete order in one sorting, instead of relying on sort stability.
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/