logo separator

[mkgmap-dev] [PATCH V3]mkgmap performance

From GerdP gpetermann_muenchen at hotmail.com on Sat Dec 31 08:59:32 GMT 2011

Hello Steve,

yes, that works fine, thanks a lot!
Together with the proposed changes regarding the "new Date()" parts mkgmap
now creates identical output for identical input, which helps a lot when
trying performance patches. Attached is the patch that I use for this. 

http://gis.638310.n2.nabble.com/file/n7139860/identical_output.patch
identical_output.patch 

ciao,
Gerd



Steve Ratcliffe wrote
> 
> There is an option --preserve-element-order which makes the maps used to 
> save the ways into LinkedHashMaps which should mean that the iteration 
> order is defined by the order they are added to the map and not by the 
> hashCode(). I was wondering why this option didn't work to make the maps 
> identical.
> 
> I found the reason: this simple patch in MultiPolygonRelation:
> 
>   	private final Map<Long, Way> tileWayMap;
>   	private final Map<Long, String> roleMap = new HashMap<Long,
> String>();
> -	private Map<Long, Way> mpPolygons = new HashMap<Long,
> Way>();
> +	private Map<Long, Way> mpPolygons = new LinkedHashMap<Long,
> Way>();
>   	
>   	
> is all that is needed to make the --preserve-element-order option
> work, at least for my test file.
> 


--
View this message in context: http://gis.638310.n2.nabble.com/PATCH-mkgmap-performance-part-2-tp7123938p7139860.html
Sent from the Mkgmap Development mailing list archive at Nabble.com.



More information about the mkgmap-dev mailing list