Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Caching SuperCluster Index

Open
#218 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript
Domain
web-dev

Research direction

Start from the Supercluster construction and the .load(geoJsonData.features) entry point shown in the issue. Determine whether the generated index can be persisted and reused across instances, and define how cached data should handle the clustering options and input records. Done means large datasets can reuse a valid index instead of rebuilding it with load().

Written by the indexing model from the issue text.

Description

enhancement

Hi, is it possible to cache index generated by SuperCluster so that I can use it next time instead of calling new Supercluster({}).load() Again?

The code below takes time for large records. I am trying to get over this issue.

superclusterIndex = new Supercluster({
map: (props) => props,
radius: MapConfig.clusterRadius,
maxZoom: ClusterZoomLevel.maxZoom,
}).load(geoJsonData.features);

Dominant language
JavaScript
Stars
2.4k
Forks
303
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mapbox/supercluster

All issues in mapbox/supercluster

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.