mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-11 13:52:19 +00:00
Load the layer displays lazily and rebase the main-chunk budget
Every layer display was imported statically from the manifest, so all of them sat in the Cesium-mode main chunk. They are re-exported from one module, src/app/layers/displays.js, which the manifest loads with one import() before the catalog is built, on every engine; rendererFor stays synchronous after that. One chunk beats per-family chunks here: every start loads every display, and split chunks compress worse. CCTV's world click gesture moves out of its display, which the app imported only for it. Tests that build layers without the application await the loads. Keyless, gzip-9: the main chunk falls from 2,113,641 to 2,066,560 bytes, below the 2,090,274 of the merge with main this branch carries. A cold Cesium start loads about 7 KB more JS in total over four requests, with the same time to a ready page. The budget's baseline moves to the new size; it had never absorbed main's own growth.
This commit is contained in:
1 parent
47d63128ff
commit
b53b6a48a7
22 files changed
+239
-114
No files matched your search
@@ -3447,6 +3447,7 @@
|
||||
"src/globe/navara/followGestures.js",
|
||||
"src/app/layers/directory.js",
|
||||
"src/app/layers/renderers.js",
|
||||
"src/app/layers/displays.js",
|
||||
"src/layers/aircraft/render/display.js",
|
||||
"src/layers/flights/render/display.js",
|
||||
"src/layers/military/render/display.js",
|
||||
@@ -3551,6 +3552,7 @@
|
||||
"src/layers/cctv/render/cesiumMeshes.js",
|
||||
"src/layers/cctv/render/meshes.js",
|
||||
"src/layers/cctv/render/display.js",
|
||||
"src/layers/cctv/worldClick.js",
|
||||
"src/layers/transit/render/display.js",
|
||||
"src/layers/earthquakes/render/display.js",
|
||||
"src/layers/airQuality/render/display.js",
|
||||
@@ -4229,6 +4231,7 @@
|
||||
"src/globe/cesium/follow.js",
|
||||
"src/app/layers/directory.js",
|
||||
"src/app/layers/renderers.js",
|
||||
"src/app/layers/displays.js",
|
||||
"src/layers/aircraft/render/display.js",
|
||||
"src/data/selectionDispatcher.js",
|
||||
"src/layers/shared/color.js",
|
||||
@@ -4293,6 +4296,7 @@
|
||||
"src/layers/cctv/render/cesiumMeshes.js",
|
||||
"src/layers/cctv/render/meshes.js",
|
||||
"src/layers/cctv/render/display.js",
|
||||
"src/layers/cctv/worldClick.js",
|
||||
"src/layers/transit/render/display.js",
|
||||
"src/layers/earthquakes/render/display.js",
|
||||
"src/layers/airQuality/render/display.js",
|
||||
|
||||
Reference in new issue
Block a user