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

Memory Issue #123

Open
blackhattristar opened this issue Jul 31, 2016 · 17 comments
Open

Memory Issue #123

blackhattristar opened this issue Jul 31, 2016 · 17 comments

Comments

@blackhattristar
Copy link

blackhattristar commented Jul 31, 2016

I'm receiving this message in the Xcode console:

Message from debugger: Terminated due to memory issue

My device is an iPhone 6 Plus with the latest software v9.3.3

My settings in the iPokeGo settings menu are Pokémon, PokéStops, Gyms and Show Timer ON

I forgot to mention that this message is appearing and the app is force quitting when changing scan location.

@parrots
Copy link
Contributor

parrots commented Aug 1, 2016

@blackhattristar can you try things with the code from PR #125 ? I've been debugging and profiling that a lot today and when running on device I haven't seen it go above ~150 megs. Still high, but the memory seems to be under control now and never seems to go high enough to get terminated.

@blackhattristar
Copy link
Author

I would recommend scanning in a location like New York City and then try to run a scan at your current location. The app should terminate. At least with the latest version for me, when PokeStops is on and I have PokeStops on the map and then long press to scan, the app freezes and then terminates. I'll take a look at the code from PR #125

@parrots
Copy link
Contributor

parrots commented Aug 1, 2016

@blackhattristar can you email me a server URL running scans in NYC that I can point to to test?

I'm running 8x step-8 scans in my city, which gets me up up to 150megs, but yeah I can guess that NYC might be a lot worse. 😭 Might be hard to optimize for but I'd suspect we need to start only showing annotations in the visible region.

@blackhattristar
Copy link
Author

I think the problem is that the map is retaining the PokeStops on the map. If I scan in NYC and then scan in CA, the app is going to terminate because it can't handle all those PokeStops. It will retain the ones that appeared in NYC. I'm running -st 10 in Manhattan, NYC

@blackhattristar
Copy link
Author

Your app doesn't terminate when changing scan locations while having PokeStops on?

@parrots
Copy link
Contributor

parrots commented Aug 1, 2016

It hasn't for me, nope. That might be suburbia life though (although I do have a few large regions scanned for a few hundred stops).

img_0921
That has me at 92 megs, with stops and pokemon enabled. (pokemon not recently scanned in south position)

@blackhattristar
Copy link
Author

If you're up for the test, you could always try and maneuver over to NYC and scan there to see if it's just me or... Maybe submit a pull request / update the master with the changes you've made to your app to help memory usage? Maybe your version is working but not the latest version on GitHub may have problems when trying to scan multiple populated locations.

@parrots
Copy link
Contributor

parrots commented Aug 1, 2016

There's a pull request in with all the changes I've been making today, just waiting for it to be merged into master. I don't have merge rights.

@blackhattristar
Copy link
Author

blackhattristar commented Aug 1, 2016

Very cool. I look forward to testing the updates. Let me know if you try scanning in Manhattan. Trust me, you'll be blown away by the amount of PokeStops and Lured PokeStops there are.

@blackhattristar
Copy link
Author

In the meantime, when I get home I'm going to try some of the code fixes from PR #125 and see if anything helps. I'll let you know if the problem continues.

@istornz
Copy link
Owner

istornz commented Aug 1, 2016

@parrots @blackhattristar Now merged

@blackhattristar
Copy link
Author

@istornz @parrots Looks like the problem still persists. When I turn PokéStops on and try to scan the map, the app terminates.

@istornz
Copy link
Owner

istornz commented Aug 1, 2016

@blackhattristar Strange, I have an iPhone 6 Plus too and I can see a lot of annotation on the map...
May be try to delete all app in background.

@blackhattristar
Copy link
Author

@istornz Very strange. I don't know how I could be the only one with this issue :p

Have you tried scanning Manhattan, New York City and then scanning your current location? The map is retaining the information on the PokéStops. Which means if I scan in a heavily populated area and then scan in a totally different state, the memory issue arises because the map is retaining those PokéStops in the heavily populated area. Is there any way around this?

@blackhattristar
Copy link
Author

There is no problem with scanning as long as PokéStops is turn OFF. :(

@blackhattristar
Copy link
Author

@istornz @parrots Is there any way to cluster the PokéStops?

@parrots
Copy link
Contributor

parrots commented Aug 9, 2016

@blackhattristar clustering is possible, but not without a lot of work. Apple doesn't provide a built-in way to do this. There are some third party solutions, but nothing that'd we'd be able to just drop in.

Some ideas on doing it manually here: https://robots.thoughtbot.com/how-to-handle-large-amounts-of-data-on-maps

For now we might want to consider just disabling non-lured pokestops through an option

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

3 participants