Geodan / pg2b3dm

Tool for creating 3D Tiles from PostGIS geometries
MIT License
348 stars 64 forks source link

Slow Initial Loading of Website #66

Closed reHildeb closed 3 years ago

reHildeb commented 3 years ago

Hello,

i have a slow loading time every time my site is called first time.

My starting position: I tested all buildings for North-Rhine Westphalia (~60.000 1x1km Tiles ; 23 GB) and the Performance was good. After this I tried whole Germany (~500.000 1x1km Tiles ; 103 GB). Here the loading time is somewhere beteween 20 Secondes to a few minutes. (Depends on Internet speed and Hardware). I use Mapbox GL JS.

Improvements I tried: Shrink the json-file. Had a small positive effect. Calculate 2x2km Tiles. In my opinion also a small improvement. But its not nearly enough for a fast service.

Do you have other suggestions? For Example in Mapbox3DTiles.js in ThreeDeeTile-Class the 'json'-case. Does it mean i can refer in my root-tileset to another json, which includes my b3dm Tiles? If so do you have an example because it didn't work for me.

Maybe you have an idea where the issue is coming from, i couldn't really identify a problem. Could it be the big area or the amount of data?

Thanks Hendrik

tomvantilburg commented 3 years ago

What might help in the case of a lot of tilesets is splitting them into sub-tilesets. The specification is a bit brief but it mentions external-tilesets: https://github.com/CesiumGS/3d-tiles/tree/1.0/specification#external-tilesets What we do ourselves is make exports of seperate municipalities and stitch them together later in a super-json It will take some scripting on your tileset but nothing that basic python can't handle.

bertt commented 3 years ago

here a sample of external tilesets https://bertt.github.io/mapbox_3dtiles_samples/samples/external/ (loads super_tileset.json containing tileset_1_0.json and tileset_0_0.json)

reHildeb commented 3 years ago

Thank you very much. This is exactly what i searched for. My Problem was i had a double transform (in root.json and external.json) Next step is scripting.