kekscom / osmbuildings

OSM Buildings Classic 2.5D
http://osmbuildings.org
BSD 2-Clause "Simplified" License
505 stars 140 forks source link

Drive-by traffic generates Overpass API load even when osmbuildings layer is disabled #79

Closed mmd-osm closed 9 years ago

mmd-osm commented 9 years ago

Please take a look at the following example with Chrome Developer Tools or Firebug active: example.

This page has a nifty OSM map on the "map" tab with an additional OSMBuildings overlay layer. By default, this layer is disabled. Nevertheless, a few Overpass API requests are triggered, causing additional load on the main instance (this might be also interesting for @drolbr).

While the single call might only take a few seconds, this quickly adds up on a high volume site. When browsing through a number of different houses for rent, a new OSM map will be initialized each time. Unfortunately, many users will probably not realize immediately that there's some cool 3D building model available, but they still trigger the API calls.

Now, the question is, if this is some side effect of a wrong usage of osmbuildings, or is there some other way to optimize this behavior for this kind of use case?

Thanks for looking into this and keep up the great work!

kekscom commented 9 years ago

I've had a look. First, it seems not to be a quite a recent version of OSM Buildings as it hits Overpass directly. That should not happen anymore. Other things are reproducible. Main issue is, that the layer gets added automatically and is the removed immediately. See #70 I'll provide a solution soon.

mmd-osm commented 9 years ago

I'll provide a solution soon.

Great, thanks a lot!

fyi: I sent you an email with additional background information.

kekscom commented 9 years ago

fixed #70 in commit a3b57a7

I'll get in touch with the particular website causing that load.