Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Large GeoJSON files: Additional layers are causing slowdowns #216

Open
perfectly-preserved-pie opened this issue Mar 29, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@perfectly-preserved-pie
Copy link
Owner

The crime and oil well GeoJSONs are pretty big:

  • oil well: 6MB
  • crime: 32MB (lol)

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.

@perfectly-preserved-pie perfectly-preserved-pie added the bug Something isn't working label Mar 29, 2024
@perfectly-preserved-pie
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant