Instead of keeping geometry in memory, keep it in a Mapdb. It's only used during rendering itineraries.