logo separator

[mkgmap-dev] [PATCH V3]mkgmap performance

From WanMil wmgcnfg at web.de on Fri Dec 30 23:40:07 GMT 2011

> Hi
>
>>   >  No its not expected. In fact it appears to happen even for max-jobs=1
>>   >  when you compile the same file twice on the same run. I will try to
>>   >  track that down too.
>>
>> okay, thanks. Is this related to IdentityHashMaps ?
>
> Well I've found it. Don't know why it took so long as it was exactly
> what I thought it might be in the first place!
>
> It is FakeIdGenerator - there is only one that is shared across all
> maps, rather than a separate one being used for each map.
>
> Because of the way that it is used, this is difficult to fix.
>
> If you modify it to always return the same id then the differences go
> away on my test map. However the map is smaller than the one made
> without the mod, so it looks like it is absolutely essential that the
> ids are different and this is no solution, maybe not even for testing of
> performance changes.
>
> ..Steve
>

Maybe it's possible to seperate the id ranges of the FakeIdGenerator?
Example:
startId = 1L << 62 + (tile no - starting with 0) * (1L << 62 / noOfTiles)

But that would require that all calls to the FakeIdGenerator are no 
longer static (or they must use the ThreadLocal object?).

WanMil



More information about the mkgmap-dev mailing list