Overpass-API icon indicating copy to clipboard operation
Overpass-API copied to clipboard

implement area size heuristic for area:id queries

Open tyrasd opened this issue 8 years ago • 6 comments

fixes #359. The implementation feels a bit hacky / inefficient (since we need to iterate twice over all areas now), but I didn't see another way to access the area's used_indices property. Any pointers for possible improvements are welcome.

tyrasd avatar Mar 02 '17 15:03 tyrasd

Cherry-picked the changes to my branch, tested both variants. Memory consumption looks good, there's a somewhat larger runtime in one case, which is due to some unrelated code in area_query.cc. Bottom line: result is still way better than before, though.

way["building"](area:3600285864);out;
Command being timed: "./osm3s_query"
User time (seconds): 5.54
System time (seconds): 0.10
Percent of CPU this job got: 99%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:05.65
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 123124
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 31456
Voluntary context switches: 13
Involuntary context switches: 487
Swaps: 0
File system inputs: 0
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0

area(3600285864);
way["building"](area._);
out;
Command being timed: "./osm3s_query"
User time (seconds): 3.58
System time (seconds): 0.09
Percent of CPU this job got: 99%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:03.67
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 122904
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 0
Minor (reclaiming a frame) page faults: 36025
Voluntary context switches: 13
Involuntary context switches: 191
Swaps: 0
File system inputs: 0
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0

mmd-osm avatar Mar 03 '17 18:03 mmd-osm

I had some issues to apply this PR cleanly, although Github claims that everything is fine. I think this a side effect of the most recent std:: additions across the whole source code. Can you merge the current master and update the pr? thanks!

mmd-osm avatar Mar 08 '17 12:03 mmd-osm

although Github claims that everything is fine

I think that was simply because the PR was requested against the minor_issues branch. I've changed it to master now and am looking into the conflicts.

tyrasd avatar Mar 08 '17 13:03 tyrasd

should be resolved now

tyrasd avatar Mar 08 '17 13:03 tyrasd

fyi: I deployed your patch on the following endpoint: http://dev.overpass-api.de/api_mmd/

mmd-osm avatar Mar 28 '17 19:03 mmd-osm

This one got superseded by https://github.com/drolbr/Overpass-API/commit/dba448fca45d48eff3a850eaa366f78a8355a69e -> this pull request can be closed, there's nothing left to do.

mmd-osm avatar Apr 11 '18 21:04 mmd-osm