Atlaslog / Field Notes / 3D & Cesium
Field note · 3D & Cesium
Terrain tiles load slowly and the first screen spins for over ten seconds
Quick answer
Imagery fills in immediately but terrain shows jagged holes while the queue holds 231 pending requests against only 6 active. The bottleneck is the request cap plus extra water mask and normal fetches, not bandwidth.
Symptom
- globe.tilesLoaded stays false for more than 12 seconds.
- RequestScheduler.statistics shows numberOfActiveRequests 6 and numberOfPendingRequests 231 out of 412 attempted.
- terrain requests sit pending in the network panel while imagery is already complete.
Checklist
- Read Cesium.RequestScheduler.statistics to separate concurrency limits from slow server responses.
- Measure a single terrain tile, which should take 10 to 30 ms and weigh a few tens of KB.
- Compare total request counts with requestWaterMask on and off.
- Check the response Cache-Control, since without max-age every visit refetches.
- Check whether HTTP/1.1 caps the origin at 6 connections.
Fix
Create the provider with requestWaterMask: false and requestVertexNormals: false, set globe.maximumScreenSpaceError to 4, or start at 8 and lower it to 3 after 2.5 seconds, and raise tileCacheSize from 100 to 200. Serve tiles over HTTP/2 with Cache-Control public, max-age 31536000 and immutable.
Code
console.log(Cesium.RequestScheduler.statistics);
// { numberOfAttemptedRequests: 412,
// numberOfActiveRequests: 6,
// numberOfCancelledRequests: 0,
// numberOfPendingRequests: 231 }var terrain = await Cesium.CesiumTerrainProvider.fromUrl(
'https://terrain.example.cn/tiles/',
{
requestWaterMask: false,
requestVertexNormals: false
}
);
viewer.terrainProvider = terrain;
Watch out
- Raising the concurrency limit as the only fix: bandwidth is split thinner and the last tile still arrives late.
- Leaving requestWaterMask on for an inland project, doubling every tile request for water that never appears.
English edition written for Atlaslog from the original Chinese field note. Code is unchanged and runs as-is.
Atlaslog (2026). Terrain tiles load slowly and the first screen spins for over ten seconds. https://www.jingweizhi.com/en/cookbook/cesium-terrain-slow.html (accessed 2026-11-03).