Hi,
Barry Hunter provides a number of KML-related tools from his website
including a kml sorter but it is limited to 500kb.
http://www.nearby.org.uk/sort-kml.php
You may want to split your KML file into 3 smaller files and try it.
Otherwise you could also try GPSBabel -- it has a filter option to
sort waypoints by name, description, etc.
http://www.gpsbabel.org/
--jason