Open perfectly-preserved-pie opened 3 months ago
I've been thinking about this and there has to be a way to lazy-load these datasets. I only want them to load when a user ticks the checkbox inside the LayersControl
object; it should be so obvious...
That would keep the performance the same and only drop it when a user consciously takes action to load the layer.
The crime and oil well GeoJSONs are pretty big:
The browser has to fetch an additional ~38MB of data which is causing the pages to render slowly upon initial load... but once they do, everything is pretty fast again. Still, I need to find a way to reduce the GeoJSON size.
I've disabled these layers in prod for now because speed is more important than anything. If it's not quick no one will bother using the website.