mapbox / mapbox/mapbox-maps-ios

FPS Dropping while scrolling, zooming or idling

Open
#2,138 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged bug :beetle:
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:
mapbox_fps_dropping
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.