logo separator

[mkgmap-dev] [PATCH]mkgmap performance part 2

From GerdP gpetermann_muenchen at hotmail.com on Sat Dec 24 14:13:56 GMT 2011

Hello list,

I got no feedback regarding my last performance patch for mkgmap, so I don't
know if nobody tested it. Anyway, here are a few more small suggestions for
changes (can be applied
http://gis.638310.n2.nabble.com/file/n7123938/mkgmap_performance_2.patch
mkgmap_performance_2.patch  on r2145 and gmap-mdr branch 2144 as well) :
On my dual-core machine, creating a gmapsupp.img of ~ 91MB (Niedersachsen)
with max-jobs=2 required ~ 352 secs with r2145, and 268 secs (~ 25% less)
with my previous patch + this one, so I think it is worth trying.

For removeShortArcsByMergingNodes:
- The IdentityHashMap arcCounts counts arcs, but the only result that is
used is wether or not an arc was found. My patch replaces this frequently
used map and uses a bit in Coord instead. 

- the current algorithmn tries to find replacements for each point, this is
quite costly. One more bit in Coord reduces the number of loops from >
1.000.000 to ~1000.

For LocationHook:
I've replaced the getUsedLocationTags() by testHasAllTags(). This just
returns true if all tags in List remainingLevels are existing, instead of
merging HashSets to get the same result.

For RuleSet / RuleIndex:
I've replaced the HashSet<Integer> by BitSet. This is faster because we
don't have to use 
Collections.sort(candidates);
to handle duplicate rules.

Gerd



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



More information about the mkgmap-dev mailing list