[ClusterStats] compute lazily #645
Labels
good first issue
This issue is a good place to started contributing to this repository.
priority: p3
Desirable enhancement or fix. May not be included in next release.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
As of today the stats are computed eagerly as they are constructed:
js-markerclusterer/src/renderer.ts
Lines 35 to 50 in e8eecf4
That's wasted CPU cycles when the stats are not required (i.e. with a custom renderer).
We should compute the stats lazily when one of the
markers
's property is first accessed to avoid that.This could be done in a backward compatible way using getters.
The text was updated successfully, but these errors were encountered: