Clustering: Bad framerate on new devices #411
Labels
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Enabling clustering makes moving around the map really choppy, as in the framerate stutters.
My app has been using clustering for many years, and this issue seems to be happening to newer devices. I noticed when I got an iPhone 13. I have asked some of my users with older devices, and they don't experience this issue.
My app don't really show many markers. Around 500 at the most. If I disable clustering and render all the markers then performance is great (though usability suffers due to the crowded map). If I enable clustering, even zooming out so I only see a couple of clusters and no other markers, it still stutters the same.
The offending code seems to be this:
google-maps-ios-utils/src/Clustering/View/GMUDefaultClusterRenderer.m
Lines 235 to 236 in f2cb679
If I comment out that line of code and just set
shouldShowCluster
to alwaystrue
then it works smooth again. For some reason the performance has an issue with using map projection.There is a very relevant bug report for Google Maps here: https://issuetracker.google.com/issues/219068007
The app I have in production right now is using Google Maps v2.7.0 and utils v2.0.0, and it has this problem. Updating to newest version of everything does not help.
The issue is either in iOS or Google Maps, so unless you have a good workaround that does not use projection, then this probably have to wait for someone else to fix it.
Environment details
iOS: v15.4.1
Device: iPhone 13
Google Maps: v2.7.0, v6.2.1
Google Maps iOS Utils: v2.0.0, v4.1.0
Steps to reproduce
The text was updated successfully, but these errors were encountered: