Skip to content

Updating multiple markers every second causes lag based on number of markers. #57

@foxy17

Description

@foxy17

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.
Screenshot_2024-06-16_at_4 05 31_PM
This is after few more updates. There were almost 50+ calls to update#map.
Screenshot_2024-06-16_at_4 04 01_PM

Smartphone (please complete the following information):

  • Device: Iphone 15
  • Version 17

flutter doctor
Please add the flutter doctor output.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions