mapbox / mapbox/mapbox-maps-ios
FPS Dropping while scrolling, zooming or idling
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 601
- Forks
- 196
- PR merge metrics
- No merged PRs in 30d
Description
Environment
- Xcode version: 15.2.0
- iOS version: 17.3.1
- Devices affected: iPhone 12
- Maps SDK Version: 11.2.0
I've encountered an issue where the map rendering behaves unstably. Upon launching the application, during scrolling, the frame rate can drop for 3-5 seconds, then recover to a stable 60 fps. Then, if zooming or scrolling, it may drop again to 20-30 frames (or it may not). This affects the entire application; some UIKit animations will also drop frames along with the map (or work at 60 frames if there are no drops at the moment).
Here's the result of tracing:
as you can see, the draw method sometimes takes 16ms and sometimes 33ms during scrolling. I suspect the problem lies within it, but I can't inspect it since its implementation is not open source.
That's occurring with predefined mapbox style, without drawing any annotations or routes (just map with tiles and glyphs).
Additionally, I'd like to note that this issue has been occurring for quite some time, starting from MapBox version 10.5.x at least.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file or test is named. Reproduce on an iPhone 12 with Xcode 15.2, iOS 17.3.1, and Maps SDK 11.2.0 using the predefined style without annotations or routes, then profile the map's draw method during scrolling, zooming, and idle periods. Done means identifying and addressing the cause of the reported 20–30 FPS drops without disrupting UIKit animations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- computer-graphics, mobile-dev, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100