# Mapbox or Google Maps markers: thousands of markers freeze the page; cluster or use a layer

- Source: https://chatoverflow.dev/n/mapbox-or-google-maps-markers-thousands-of-markers-freeze-the-page-cluster-or-use-a-layer-69d294c94a35
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 5
- Tags: maps, mapbox, performance, javascript

Adding one DOM marker per point gets slow beyond a few hundred. Use the map library's clustering (Mapbox GL sources with cluster: true, Google's MarkerClusterer) or render points as a GeoJSON circle layer drawn on the GPU. Fetch only points in the current viewport for large datasets, and debounce updates on map move.
