
Hi WanMil, I don't understand the changes in the OSM readers, e.g. // the type tag is required for relations - all other tags are filtered if (elem instanceof Relation == false || "type".equals(key) == false) key = keepTag(key, val); if (key != null) elem.addTag(key, val.intern()); I'd prefer to make sure that "type" is not filtered by keepTag(), because the keepTag method "inlines" the key. What was the reason for that change? Gerd -- View this message in context: http://gis.19327.n5.nabble.com/mergeroads-branch-tp5779967.html Sent from the Mkgmap Development mailing list archive at Nabble.com.

Hi WanMil,
I don't understand the changes in the OSM readers, e.g. // the type tag is required for relations - all other tags are filtered if (elem instanceof Relation == false || "type".equals(key) == false) key = keepTag(key, val); if (key != null) elem.addTag(key, val.intern());
I'd prefer to make sure that "type" is not filtered by keepTag(), because the keepTag method "inlines" the key. What was the reason for that change?
Gerd
The "type" tag is required for relations but not for ways and nodes. The code makes it possible to remove if from the builtin-tags-list. In case you want to inline the type tag I propose to change it to if (elem instanceof Relation && "type".equals(key)) key = "type"; else key = keepTag(key, val); By the way: keepTag inlines the key by retrieving the key from the usedTags set. Is that faster than key.inline()? At least it prevents "real" inlining over multiple threads? WanMil

Hi WanMil, WanMil wrote
The "type" tag is required for relations but not for ways and nodes. The code makes it possible to remove if from the builtin-tags-list. In case you want to inline the type tag I propose to change it to
if (elem instanceof Relation && "type".equals(key)) key = "type"; else key = keepTag(key, val);
ok, I understand. I did not try it, but I think this will help GC, at least for the bin readers that store references to string tables. WanMil wrote
By the way: keepTag inlines the key by retrieving the key from the usedTags set. Is that faster than key.inline()? At least it prevents "real" inlining over multiple threads?
In the past we did both, first inline() and then a call to keepTag. That was slower and required more mem. The inlining seems to be very complex, maybe because it has to handle many more strings? Gerd -- View this message in context: http://gis.19327.n5.nabble.com/mergeroads-branch-tp5779967p5779973.html Sent from the Mkgmap Development mailing list archive at Nabble.com.

Hi WanMil,
WanMil wrote
The "type" tag is required for relations but not for ways and nodes. The code makes it possible to remove if from the builtin-tags-list. In case you want to inline the type tag I propose to change it to
if (elem instanceof Relation && "type".equals(key)) key = "type"; else key = keepTag(key, val);
ok, I understand. I did not try it, but I think this will help GC, at least for the bin readers that store references to string tables.
I've commited that to all readers. It's definitely better than not interning it :-)
WanMil wrote
By the way: keepTag inlines the key by retrieving the key from the usedTags set. Is that faster than key.inline()? At least it prevents "real" inlining over multiple threads?
In the past we did both, first inline() and then a call to keepTag. That was slower and required more mem. The inlining seems to be very complex, maybe because it has to handle many more strings?
Interesting! I've now also interned the strings that are put into the usedTags maps. So the strings are now also interned. WanMil
Gerd

Hi WanMil, WanMil wrote
Interesting! I've now also interned the strings that are put into the usedTags maps. So the strings are now also interned.
I don't think this will have an effect. Hard coded strings are interned, and keys from rules should be interned elsewhere. Gerd -- View this message in context: http://gis.19327.n5.nabble.com/mergeroads-branch-tp5779967p5779992.html Sent from the Mkgmap Development mailing list archive at Nabble.com.
participants (2)
-
GerdP
-
WanMil