Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

238
Views
React Leaflet supercluster map performance issue

I'm using supercluster (and use-supercluster) to render about 40k+ markers on a react/leaflet map. I've created a codesandbox here to demonstrate the issue, but essentially I'm noticing that the map is incredibly slow to respond (defeating the purpose of supercluster). For example, as soon as the map loads, try to drag the screen in any direction - often it doesn't move at all, and at best takes several seconds. Further, in the codesandbox, I've only been able to include about 1/4 of the data points because the site crashes, so it's important to know that my issue is probably 5x worse than noticed in the sandbox. I've included a video here for reference - you'll see that when dragging the map, it takes several seconds to respond. Many of my modals / popups no longer work, and the map often freezes for unmanageable amounts of time. I know supercluster has the ability to handle millions of data points without latency, so I suspect this is an issue with my organization / use of components.

My dependencies and some of the code can be found in the linked sandbox. If there's anything in particular that would be helpful to diagnose, I'd be happy to share details - I'm really just unsure where to even start looking.

For the purposes of demonstrating the issue, I've simply assigned the data points driving my map through a json file. With this SO post, I'm hoping to receive suggestions for how I may go about troubleshooting my lag - are there specific tools (ex. Firefox React Devtools) or suspect practices that I may look to investigate?

Edit - my gut feeling suspects it's an issue because I implicitly re-render all markers (as suggested in this SO) - however, I'm having trouble figuring out how to find evidence that I'm in fact doing so?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!