Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino
Use the new pre-sort function to allow UpdateSegments() and SortSegmentList() to be combined into a single SortSegmentListGeographically() function that only reads and writes the data once instead of twice.