Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Map updates are slow when using a Feature Collection with many features iOS 12 beta #12385

Closed
ahartwel opened this issue Jul 13, 2018 · 4 comments
Labels
Core The cross-platform C++ core, aka mbgl iOS Mapbox Maps SDK for iOS performance Speed, stability, CPU usage, memory usage, or power usage

Comments

@ahartwel
Copy link

ahartwel commented Jul 13, 2018

We are periodically updating a source's shape with a GeoJSON Feature Collection containing 750+ features. When running on iOS 11 there is a slight stutter while the map updates but on iOS 12 it freezes the main thread for up to a couple seconds and sometimes longer depending on how many of those features are visible at the time of the update.

Most of the time is spent in GLKView _display/glDrawElements
image

Steps to reproduce

  1. Install iOS 12 beta
  2. Periodically update a source's shape with a geojson feature collection

Expected behavior

The map pans/zooms smoothly while updating a source's shape.

Actual behavior

The app freezes and becomes unusable for up to a couple seconds depending on how many features are in the collection.

Configuration

Mapbox SDK versions: 4.0.3 and built from master
iOS/macOS versions: 10.13.4
Device/simulator models: iOS 12, iPhone 7 Plus
Xcode version: xcode 10 beta

@ahartwel ahartwel changed the title Map extremely slow when using a Feature Collection with many features iOS 12 beta Map updates are slow when using a Feature Collection with many features iOS 12 beta Jul 13, 2018
@tobrun tobrun added the iOS Mapbox Maps SDK for iOS label Jul 16, 2018
@fabian-guerra fabian-guerra added the Core The cross-platform C++ core, aka mbgl label Jul 16, 2018
@1ec5
Copy link
Contributor

1ec5 commented Jul 19, 2018

There’s a general known issue with GeoJSON source updates being slow when a lot of features are involved: #8484.

@friedbunny
Copy link
Contributor

Thanks for the report, @ahartwel. A couple follow-ups:

  • This Instruments trace isn’t very informative without symbols for Mapbox.framework — it needs to be able to find the associated dSYM. If you’re building the framework yourself, you can set the Dynamic target’s DEBUG_INFORMATION_FORMAT to dwarf-with-dsym, rebuild, etc., and then profile again.
  • If you’re able to provide a minimal reproduction (data, code, or both), that’d be much appreciated.

@friedbunny friedbunny added the performance Speed, stability, CPU usage, memory usage, or power usage label Jul 19, 2018
@ahartwel
Copy link
Author

In the latest beta release (4) of iOS 12 the performance is the same as iOS 11. 🎉

@julianrex
Copy link
Contributor

Thanks @ahartwel. I'm going to close this as fixed 😉

Please re-open if you see it again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Core The cross-platform C++ core, aka mbgl iOS Mapbox Maps SDK for iOS performance Speed, stability, CPU usage, memory usage, or power usage
Projects
None yet
Development

No branches or pull requests

6 participants