vasturiano / globe.gl

UI component for Globe Data Visualization using ThreeJS/WebGL
https://vasturiano.github.io/globe.gl/example/world-population/
MIT License
2.06k stars 304 forks source link

netcdf file/geojson with 200000 records cause browser memory crash #77

Open kcbenny opened 2 years ago

kcbenny commented 2 years ago

I tried to fetch the geojson file with around 200000 records, i already removed some unused variables inside geojson, and still cause browser memory crash when using polygonsData(), when i load 20000 records , the globe spins extremely slow, want to know if there is anything we can do to improve the globe.gl js polygonsdata logic, as inside it is using foreach to generate the polygons that make the loading slow.thank you.

vasturiano commented 2 years ago

@kcbenny thanks for reaching out.

A volume of 200k polygon objects will be very difficult to render without serious memory issues or performance degradation. I would recommend to pre-filter this data dynamically, and/or aggregate hierarchically. For example, if you're trying to show very geographically fragmented data, group it first into say countries, and only show it for a single country at a time when clicked.

kcbenny commented 2 years ago

thanks for reply, my goal is to show the color of those polygons base on temperature Here is my enquiry:

  1. is there any way to lazy loading the data, or load the data that visible to user when rotate, because if user click the country, i just wonder it will cause sudden lag because the library needs to draw large amount of data ?
  2. not sure what mean by aggregate hierarchically.
  3. it is not user-friendly click on a country to show the temperature of different parts in this country

hope you can guide me to make it easy to solve this problem thank you