mkgmap incredibly slow

I’m using mkgmap again for the first time in months and love all the new features… or rather I would if I could get it to give me any output!

I’m currently trying to create a map from a Great Britain planet extract, which I’ve split into six parts with splitter.jar (I’m using some big route relations so can’t split it any further). The resulting .gz files are between 19Mb and 36Mb in size.

But after 12 hours, no .img had been created and the program was still whirring away. The command line I’m using is:

java -Xmx1000m -jar mkgmap-r1067/mkgmap.jar --style-file=/path/to/cyclemap/ --route --net --no-sort-roads -c template.args

The style file is reasonably complex and contains numerous ‘set’ instructions, plus a handful of relation 'apply’s. My system is an Intel Mac mini, OS X 10.5, 1Gb.

Any clues?

Perhaps a loop in the cyclemap style file? Please try without the style parameter to check.

Or is your OS swapping like mad? Try giving the Java VM a bit less memory.

For reference, mkgmap takes about 7 minutes to compile the current Great Britain extract on my laptop using a simplified default style.

It takes me about 10 minutes to process the whole of GB so something must be wrong with your setup.

I have though had a couple of cases recently where mkgmap has just got stuck and as the it was still consuming resources it looks like an infinite loop. In the end I traced the reason to problems in my style files - the latest problem disappeared when I removed the comments without touching the code itself. It looks to me as if they are tightening up the style processor and that if something goes wrong there is chance of an infinite loop rather than a crash.