You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CAUTION: Do not embark on this optimization without profiling evidence that shows it is actually an issue.
Currently, when there is any change to the props that determine what data is displayed (variable, dataset, month, year), the baseline and monthly data arrays are emptied, then filled again with new values. This may inhibit React from rendering these changes efficiently.
The goal is to remove the data markers from the map while data is loading. This can be done alternatively by hiding the relevant Layer Groups, a much faster operation. This would improve performance if the markers themselves can be reused. It's not clear whether React has any influence on the Leaflet rendering of the markers, but it's possible. It's also possible that updating existing markers in Leaflet may be considerably faster than deleting and recreating them.
The text was updated successfully, but these errors were encountered:
CAUTION: Do not embark on this optimization without profiling evidence that shows it is actually an issue.
Currently, when there is any change to the props that determine what data is displayed (variable, dataset, month, year), the baseline and monthly data arrays are emptied, then filled again with new values. This may inhibit React from rendering these changes efficiently.
The goal is to remove the data markers from the map while data is loading. This can be done alternatively by hiding the relevant Layer Groups, a much faster operation. This would improve performance if the markers themselves can be reused. It's not clear whether React has any influence on the Leaflet rendering of the markers, but it's possible. It's also possible that updating existing markers in Leaflet may be considerably faster than deleting and recreating them.
The text was updated successfully, but these errors were encountered: