mapbox / mapbox-maps-flutter

Interactive, thoroughly customizable maps for Flutter powered by Mapbox Maps SDK
https://www.mapbox.com/mobile-maps-sdk
Other
290 stars 119 forks source link

Main thread stuck during SDK initialization #590

Open zhuscat opened 5 months ago

zhuscat commented 5 months ago

During the SDK initialization process, it can cause the UI main thread to freeze, resulting in the user interface unresponsive

After the map loaded, everything goes ok.

SDK version: ^2.1.0-beta.1

Flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.19.0, on macOS 14.0 23A344
    darwin-arm64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK
    version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] VS Code (version 1.89.1)
[✓] Connected device (3 available)
[✓] Network resources

Platform: iOS 15.0

evil159 commented 4 months ago

@zhuscat Could you profile the iOS project with Xcode Instruments to see what's the offending code path is?