Caching SuperCluster Index
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.4k
- Forks
- 304
- PR merge metrics
- No merged PRs in 30d
Description
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);
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
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.
Assessment
- Tech stack
- javascript
- Domain
- web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100