Map updates are slow when using a Feature Collection with many features iOS 12 beta
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

Steps to reproduce
- Install iOS 12 beta
- 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
There’s a general known issue with GeoJSON source updates being slow when a lot of features are involved: #8484.
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_FORMATtodwarf-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.
In the latest beta release (4) of iOS 12 the performance is the same as iOS 11. 🎉
Thanks @ahartwel. I'm going to close this as fixed 😉
Please re-open if you see it again.