pieterv / react-googlemaps

A declarative React interface to Google Maps
MIT License
226 stars 68 forks source link

Rerendering all markers #16

Open nikdo opened 9 years ago

nikdo commented 9 years ago

I have a simple map with many markers and possibility to select one. Clicking marker updates a controller-view state and the Map rerenders. I have a feeling that all markers are rerendered even if they didn't change. So there is no diffing mechanism like React does it with HTML, rendering only the differences. Is that correct?

It has two unfortunate consequences:

  1. Decrease of performance with growing number of markers.
  2. Flickering of markers if they overlap -- I suppose they are rendered assynchronously in slightly different order everytime. You can check that behavior on http://windfreaks.net.

Do you see any solution for these problems?