Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

239
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda