Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

get map data in squares #375

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

rfordinal
Copy link

faster map-data download, downloads only map data of viewable area. splitted into squares, also can be heavy cacheable by varnish.

@PhDeez
Copy link

PhDeez commented Aug 30, 2016

Just out of curiosity, what is the advantage of using a square over a circle? Is this more for cities that have predefined blocks, or what? Or, is this more of an option for the user?

@rfordinal
Copy link
Author

@PhDeez, map-data by defaut is requested every 10 seconds for the whole map! so, for example it's around 380kb for map with ~2000 pokemons. after my change it's only ~5-10kb every 30 seconds for visible area of map. and at second, map data are heavy cacheable for example by varnish. i'm providing map with ~3500 map requests every second, after enabled this functionality with varnish cache, only ~50-150 requests per second are provided by python runserver.

@rfordinal
Copy link
Author

@favll : working example on ipeople.sk

@quixfz
Copy link

quixfz commented Sep 8, 2016

good idea, soon i'll need something like this too. but, in the meantime, there are many easy fixes that make that data much smaller:

  • remove pokemon-name, id is enough. the id->name-list is already loaded in javascript. just use this for the name.
  • coordinates have way to much precision. 6 decimals is more than enough.
  • spawnpoint-id is not used, remove that.
  • for another 72% less data, i'm not loading the top10 pokemons :-)

i'm running a pokemongomap-server with a pogom web-frontend. the data is cached every 4 seconds. http://pg.festzeit.ch/
http://pg.festzeit.ch/m.php for the data

@Masakrowicz
Copy link

@quixfz how did You manage to not display top10 pokemon? I didn't know which files to edit and when I thought I did it just kept crashing, is there a way to have by default disabled common pokemons?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants