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

Excess CPU Usage after Location permission granted #2261

Open
bradstiff opened this issue Nov 9, 2024 · 0 comments
Open

Excess CPU Usage after Location permission granted #2261

bradstiff opened this issue Nov 9, 2024 · 0 comments
Labels
bug 🪲 Something is broken!

Comments

@bradstiff
Copy link

Environment

  • Xcode version: 16
  • iOS version: 17, 18
  • Devices affected:
  • Maps SDK Version: 10.19.0

Observed behavior and steps to reproduce

After granting Location permission, CPU usage spikes and remains very high. App gets killed by iOS because it is consuming too much CPU resource.

My app doesn't use any form of Mapbox-based 'user following'. The app handles that, as well as handling requesting permissions. The app simply displays a MapView with geojson features.

Restarting the app (after permission granted) resolves the problem.

Downgrading to 10.18.2 also resolves the problem.

Expected behavior

Don't peg the CPU.

Notes / preliminary analysis

I started a CPU Profiling session and have included the stack where the CPU usage occurs. It is in MapboxCommon, for which I don't have dSyms.

Additional links and references

114.47 Gc 95.5% - thread_start libsystem_pthread.dylib
114.47 Gc 95.5% - _pthread_start libsystem_pthread.dylib
113.71 Gc 94.9% - NSThread__start Foundation
111.02 Gc 92.7% - 0x1070ae1e4 MapboxCommon
111.02 Gc 92.7% - CFRunLoopRun CoreFoundation
111.02 Gc 92.7% - CFRunLoopRunSpecific CoreFoundation
111.02 Gc 92.7% - __CFRunLoopRun CoreFoundation
111.02 Gc 92.7% - __CFRunLoopDoBlocks CoreFoundation
111.02 Gc 92.7% - CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK CoreFoundation
111.02 Gc 92.7% - 0x1afd864e0 LocationSupport
111.02 Gc 92.7% - 0x19c455ac4 CoreLocation
111.02 Gc 92.7% - 0x19c45c0f4 CoreLocation
79.67 Gc 66.5% - 0x1070ab0a4 MapboxCommon
79.67 Gc 66.5% 79.67 Gc objc_msgSend libobjc.A.dylib

@bradstiff bradstiff added the bug 🪲 Something is broken! label Nov 9, 2024
quido3 pushed a commit to SharperShape/mapbox-maps-ios that referenced this issue Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something is broken!
Projects
None yet
Development

No branches or pull requests

1 participant