Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache or store images locally #197

Open
MysticalOS opened this issue Aug 9, 2016 · 5 comments
Open

Cache or store images locally #197

MysticalOS opened this issue Aug 9, 2016 · 5 comments

Comments

@MysticalOS
Copy link

I noticed that using map yesterday it used 1 gig of data. Yes that much on downloading pokemon images over and over and over again in a city that had 100s of them. this can be avoided by simply storing the images locally either cached once downloaded one or just including them with app to begin with. the only thing app should need to actually download is the data from server which is mostly text parsing. As for the map itself I don't think that used most of data either but could probably cache that a little better too.

Ultimately the issue here is that app uses entirely way too much data.

@istornz
Copy link
Owner

istornz commented Aug 9, 2016

This app only download a JSON file every 5sec. Images are stored localy

@MysticalOS
Copy link
Author

It used up one gig doing that? it doesn't reload map from google over and over? it's loading something big frequently.

@markvl91
Copy link
Contributor

markvl91 commented Aug 9, 2016

If you're scanning a large area the JSON file can be quite large. Not near my development pc right now, but I've seen my requests reach a megabyte easily with pokestops included. Combine that with leaving the app running in the background (1 request per 20 seconds, instead of 5 seconds) adds up really fast.

On 9 aug. 2016, at 21:31, Adam [email protected] wrote:

It used up one gig doing that? it doesn't reload map from google over and over? it's loading something big frequently.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@parrots
Copy link
Contributor

parrots commented Aug 9, 2016

Depends on how much data your server is sending back, if GZIP is enabled on the server, etc.

For example my server is set to cover an entire city, so my JSON returns are much larger than someone with one scan worker going. It doesn't just send back data for where you are viewing - it's all the data the server has. When this is happening every 5 seconds, even a 5k JSON payload would hit 42megs in 12 hours. Generally the JSON is much larger than that.

The maps aren't reloaded that often (that's all behind the scenes Apple logic), but it is a vector-based map so even if it was the data wouldn't be a lot. It isn't like this is using satellite maps.

@MysticalOS
Copy link
Author

Fair enough. guess next question. Maybe option to change frequency to higher number. I'd be ok with a 20-30 second delay. it'll mean slower notifications but i don't think 30 seconds will make or break it. if I'm not near the spawn I miss out anyways :)

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

No branches or pull requests

4 participants