istornz / iPokeGo

A native iOS client to map the Pokemon around you!
https://github.com/RocketMap/RocketMap
MIT License
642 stars 168 forks source link

Expire Gyms and PokéStops #242

Open blackhattristar opened 8 years ago

blackhattristar commented 8 years ago

Is it possible to add an expiration on the Gyms and PokéStops sorta like the Pokémon? I know the Pokémon are on a timer so they disappear eventually but the Gyms and PokéStops that appear in areas that you scan never disappear. If I scan New York and then scan Los Angeles, the Gyms & PokéStops in New York will forever be there as well as the Gyms and PokéStops in Los Angeles. Which means the server can only handle/remember so many Gyms and PokéStops from all over the globe. Which makes not only the app crash but the server crash due to memory issues. Is it possible to set an NSTimer on the Gyms and PokéStops or something of the sort that way if you scan New York for example and Gyms/PokéStops appear, in 10 minutes or so (it can be however long) the Gyms and PokéStops will disappear from the map like the Pokémon do unless you scan that area again. That way the map doesn't have to retain every single Gym and PokéStop forever.

This should be tagged as an enhancement. :)

Let me know your thoughts! This would be a HUGE help in terms of memory usage.

istornz commented 8 years ago

It's a great feature but Pokestops are stored in the server database. iPokeGO read JSON (created by data in the db). So if you want to remove Pokestops, you can do this on the client part but it's not very optimized (you read all Pokestops every 5 sec but you can't add them). I think this feature is more for the server part...

blackhattristar commented 8 years ago

How would I read the PokeStops every 5 secs on the server side and not add them? Is there a command that I run?