Use a multi-pass approach to parsing GPX files to keep memory usage down.