I looked into the RAM usage with large .gpx files and the problem is libxml2.
A test file with 840K points (115.0 MiB file size) used 848.6 MiB of heap in
libxml2 and only 45 MiB of heap for everything else (on i686; all figures
exclude allocation overhead). gpscorrelate's internal requirements are 48 bytes
per point, which is 38.5 MiB . Even if gpscorrelate reduced its use in half, it
would result in only a 2% reduction in peak usage. I'm not sure there's
anything that can be done about that beyond switching to a different XML
parser.

You can also use the new feature to load multiple gpx files. By splitting
the XML file into multiple pieces memory usage is reduced because the libxml2
memory structures are freed once each file has loaded.

Reply via email to