You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: invisible LocationPuck causing high CPU load #3787
When adding an <LocationPuck visible={false} /> and feeding continuous GPS updates with Xcode I can see a pretty high CPU load on iOS.
Expected behavior
No additional CPU load when LocationPuck is not visible.
Notes / preliminary analysis
This is caused since an 1x1 empty image is used inside RNMBXNativeUserLocation when invisible is true. Mapbox then animates this invisible image causing a pretty high load for nothgin.
I don't know the reason for that implementation but from my point of view it should be fine to just set location.options.puckType to nil.
When I launch rnmapbox and use it while moving for about 20 minutes, the CPU processing freezes. The map itself can still be operated, suggesting that map operations might be processed by the GPU.
I'm using the latest versions of rnmapbox (10.1.37) and mapbox-maps-ios (11.10.1).
Any thoughts on this from your side @mfazekas ? As mentioned I have no idea why the empty image is in place and from my testing it is fine to set location.options.puckType to nil. Should I do a PR removing the empty image and just setting location.options.puckType = nil?
@g4rb4g3 I think the reason for empty image, is I think that follow user location was only working if there was a location puck. Not sure if it's still the case.
Activity
kaito0228 commentedon Feb 25, 2025
me too!
kaito0228 commentedon Feb 28, 2025
When I launch rnmapbox and use it while moving for about 20 minutes, the CPU processing freezes. The map itself can still be operated, suggesting that map operations might be processed by the GPU.
I'm using the latest versions of rnmapbox (10.1.37) and mapbox-maps-ios (11.10.1).
g4rb4g3 commentedon Apr 5, 2025
Any thoughts on this from your side @mfazekas ? As mentioned I have no idea why the empty image is in place and from my testing it is fine to set location.options.puckType to nil. Should I do a PR removing the empty image and just setting location.options.puckType = nil?
mfazekas commentedon Oct 18, 2025
@g4rb4g3 I think the reason for empty image, is I think that follow user location was only working if there was a location puck. Not sure if it's still the case.
mfazekas commentedon Oct 18, 2025
@g4rb4g3 also why don't you just remove the LocationPuck component?
warmfire540 commentedon Oct 18, 2025
add a console.log to
onMapIdle- my phone turned into a heating pad for a second..