capacitor-plugins icon indicating copy to clipboard operation
capacitor-plugins copied to clipboard

feat(google-maps): Optimize addMarkers method for improved performance

Open CSantosM opened this issue 2 years ago • 0 comments

  • Replacing individual coroutines for each marker with a single coroutine to build all MarkerOptions in bulk.
  • Utilizing withContext instead of multiple CoroutineScope instances to switch between Main and IO dispatchers efficiently.
  • Grouping map operations to add all markers to the ClusterManager at once and triggering clustering only after all markers are added.

These changes aim to reduce overhead and improve the responsiveness of the map when adding multiple markers.

CSantosM avatar Jan 17 '24 18:01 CSantosM