fluttercommunity / fluttercommunity/apple_maps_flutter
Updating multiple markers every second causes lag based on number of markers.
- Dominant language
- Dart
- Stars
- 83
- Forks
- 119
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
So I have a usecase where the user can see a bunch of other user's live locations which keeps on updating every second. The issue is that when I have more than (n) users like 100, the maps page starts lagging with updates. I was able to recreate this in a barebones flutter app as well using the package. Looking at the debugger performance logs I can see that `update#map` is getting called in parallel multiple times.
**To Reproduce**
Steps to reproduce the behavior:
Make a recursive update map function that updates the annotations every seconds with different lattitue and longitude.
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
This screenshot is an initial screenshot when first few markers are updated.
This is after few more updates. There were almost 50+ calls to update#map.
**Smartphone (please complete the following information):**
- Device: Iphone 15
- Version 17
**flutter doctor**
Please add the `flutter doctor` output.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.