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

Unusual CPU usage on idle #1384

Closed
kushsolitary opened this issue Jun 11, 2022 · 4 comments
Closed

Unusual CPU usage on idle #1384

kushsolitary opened this issue Jun 11, 2022 · 4 comments
Labels
bug 🪲 Something is broken!

Comments

@kushsolitary
Copy link

Environment

  • Xcode version: 13.4.1
  • iOS version: 15.4.1
  • Devices affected: iPhone 11 Pro
  • Maps SDK Version: 10.4.3

Observed behavior and steps to reproduce

image

As you can see, the updateHeadingOrientationIfNeeded() is being called every second or so, which causes spikes in the CPU usage and energy usage.

Is there a way to stop this from happening?

@kushsolitary kushsolitary added the bug 🪲 Something is broken! label Jun 11, 2022
@ZiZasaurus
Copy link
Contributor

@kushsolitary are you only experiencing this behavior when the location / heading are being displayed?

@kushsolitary
Copy link
Author

@kushsolitary are you only experiencing this behavior when the location / heading are being displayed?

I am seeing this without accessing the location/displaying the heading of the user.

@samskinner32
Copy link

We are also seeing uncomfortably high CPU usage when we have the user puck enabled.

With this line added to our code: map.location.options.puckType = .puck2D(), we sit at 30-40% CPU, but if I leave that line out I'm sitting at 0-4% CPU.

Any way to address this? We're having to disable the puck for now because it's so high

@OdNairy
Copy link
Contributor

OdNairy commented Jun 16, 2023

The original issue was addressed by limiting the frequency of heading updates impacting the rendering engine. We also planning some following improvements to optimize it further.
The puck location usage issue is tracked in #1939 (comment)

@OdNairy OdNairy closed this as completed Jun 16, 2023
OdNairy pushed a commit that referenced this issue Aug 22, 2023
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

4 participants