[Tile-serving] [osm2pgsql] Huge performance loss when using --extra-atributes (#189)

Benjamin Börngen-Schmidt notifications at github.com
Tue Oct 7 20:48:56 UTC 2014


I know that these numbers are not statistically significant, but slim mode is slow anyways. I could do a 100 imports and see what happens then, but the point still remains, that using --extra-attributes has a huge performance impact. 

And yet I still fail to see where our discussion is going. Yes the numbers I posted are just examples, but they still show that something in the code slows down the import process by a very big margin. I tried to read the code, but it is not very well commented and my C or C++ skills are not that good. So what I could understand from the code was:
* -x sets a flag in osmdata_t in osm2pgslq.c
* parse-pdf.c checks if this flag is set and adds user_id, version, timestamp (still todo) and changeset to the tags of the current processed object (node, way, relation)

What happens after this is a little foggy to me, so thats the part where one of the programmers of the software has to step in :-)

>From your comments I understand, that Objects are only added if certain criteria are true. These are:
* Object has a tag that is in .style file
* other criteria 

So if I now add osm_version to my style file all objects will fullfil the criteria to be added to the DB. A wild guess is, that the extra_attributes, once added to the tag list of the Object are considered for the criteria, but they should not be, since they are only  __extra__ attributes.

---
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/issues/189#issuecomment-58259167
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20141007/c99fe78b/attachment.html>


More information about the Tile-serving mailing list