pinballmap / pbm

Pinball Map
https://pinballmap.com
GNU General Public License v3.0
110 stars 25 forks source link

See if we can avoid max zooms by returning less information when zoomed further out #1559

Open RyanTG opened 10 months ago

RyanTG commented 10 months ago

When you search and there are multiple locations in the results, we omit things like comments and scores and whatnot. That resulted in faster loading.

But we still have "zoom limits" because eventually even that lesser amount of data takes a while load, given enough of it. What if instead of zoom limits, we had another "level" of location data that returned even less info. Like, once you zoom out past X, then instead of showing the location type and the list of machines, instead it just returned the venue name and the number of machines?

I think all this would occur with Started GET "/map_location_data? ... ?

Given that some of our searches are for particular machines, those would still need to query for spots that have that one machine.

I guess the main "slow down", though, is not so much querying and returning the data as it is loading all the divs. So, if we wanted a scenario that returned every single location in America, we would probably have to exclude the sidebar that has all the locations and instead just load map markers.

Thinking out loud here. Just trying to imagine a scenario where we don't have these max zoom limits (or they are less strict).