
Hi,
it is easy to change the HashMap<Long,Coord> coordMap in ElementSaver to use the OSMId2ObjectMap that I've implemented for splitter. This could reduce peak memory usage in mkgmap.
A few numbers according to VisualVM: 2.248.404 coord instances managed in the HashMap req. 186.447.135 bytes, with OSMId2ObjectMap it is 57.194.684. This doesn't include the memory that is needed to store the Coord instances itself, (which I think is 2.248.404 * 32 = 71.948.928 bytes) it is just the overhead for the map.
The disadvantage: OSMId2ObjectMap uses fastutil.jar, which is not used in mkgmap until now. I could try to change OSMId2ObjectMap so that it runs without fastutil.jar, but that would mean to invent the wheel again.
Comments?
Gerd
Sounds good. I think it's ok to add the fastutil.jar to mkgmap. WanMil