nlaplante/angular-google-maps — pull request #502 by ccg1415 (2014-06-17 11:17:34+00:00)
Title: cluster markers icons updated after all markers are divided into clusters

Hi everyone,

in current implementation of markerer library, clusters are updated after every addition of marker into cluster. Every update is calling 'calculator' method. 'calculator' method calculates number/text shown in cluster and also 'choose' which icon is used for this cluster. In case there are lot of markers and if map view is zoomed out a lot so only few clusters with many markers are visible in the view, 'calculator' method is called N-times (N == number of markers) instead of M(number of cluster)-times. This has quite huge performance effect since clusters are recreated every time user moves or zooms the map view (it might be called twice per change).

I propose removing update cluster icon after every addition of marker and call updateIcon (on cluster) after all markers are added/divided into clusters.

ccg1415