for intersection analysis (way crosses another way), I'm using the "around" statement like in the following test case:
http://pastebin.com/raw.php?i=E1zKLPzA
This query runs for about 22s. perf results suggests that most of the time is spent in the following locations:
Events: 9K cpu-clock
47,48% osm3s_query libm-2.15.so [.] sincos
13,80% osm3s_query osm3s_query [.] cartesian(double, double)
13,54% osm3s_query libc-2.15.so [.] 0xdbcc2
5,08% osm3s_query libc-2.15.so [.] malloc
4,04% osm3s_query osm3s_query [.] great_circle_line_dist(double, do
2,99% osm3s_query libm-2.15.so [.] 0x9875
2,75% osm3s_query osm3s_query [.] _Z10cross_prodRKSt6vectorIdSaIdEE
2,58% osm3s_query osm3s_query [.] intersect(double, double, double,
2,00% osm3s_query libstdc++.so.6.0.16 [.] operator new(unsigned long)
1,32% osm3s_query libc-2.15.so [.] free
In [1] you suggested to have an additional "around:0" semantics to specifically target intersection checks, where some of the 'great_circle_line_dist' calculations might no longer be required. Possibly this would result in quite a large performance boost for this query.
[1] http://forum.openstreetmap.org/viewtopic.php?pid=300329#p300329
for intersection analysis (way crosses another way), I'm using the "around" statement like in the following test case:
http://pastebin.com/raw.php?i=E1zKLPzA
This query runs for about 22s. perf results suggests that most of the time is spent in the following locations:
Events: 9K cpu-clock
47,48% osm3s_query libm-2.15.so [.] sincos
13,80% osm3s_query osm3s_query [.] cartesian(double, double)
13,54% osm3s_query libc-2.15.so [.] 0xdbcc2
5,08% osm3s_query libc-2.15.so [.] malloc
4,04% osm3s_query osm3s_query [.] great_circle_line_dist(double, do
2,99% osm3s_query libm-2.15.so [.] 0x9875
2,75% osm3s_query osm3s_query [.] _Z10cross_prodRKSt6vectorIdSaIdEE
2,58% osm3s_query osm3s_query [.] intersect(double, double, double,
2,00% osm3s_query libstdc++.so.6.0.16 [.] operator new(unsigned long)
1,32% osm3s_query libc-2.15.so [.] free
In [1] you suggested to have an additional "around:0" semantics to specifically target intersection checks, where some of the 'great_circle_line_dist' calculations might no longer be required. Possibly this would result in quite a large performance boost for this query.
[1] http://forum.openstreetmap.org/viewtopic.php?pid=300329#p300329