Skip to content

Use a Set of markers instead of an array #627

Open
@vicb

Description

@vicb

The clusterer uses an array of markers:

markers?: Marker[];

This is inefficient has the lib often scans the whole list (and by definition the list is big when you use the clusterer):

if (this.markers.includes(marker)) {
return;
}

const index = this.markers.indexOf(marker);

switching to a Set would be much more efficient.

I could volunteer that code if using a Set is ok with the targeted list of supported browsers - let me know

Metadata

Metadata

Assignees

Labels

triage meI really want to be triaged.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions