feat(runtime): split visual graph load phase
Docs Deploy / Build and Deploy MkDocs (push) Successful in 37s
Test / Lint (push) Failing after 2m11s
Test / Test (push) Skipped
Test / Render parity (push) Skipped

This commit is contained in:
2026-07-18 11:02:46 +04:00
parent 6b007d658f
commit 2969a41bf5
2 changed files with 14 additions and 2 deletions
+5 -2
View File
@@ -116,6 +116,8 @@ pub enum MissionLoadPhase {
Map,
/// Expand object roots into a prototype graph.
Graph,
/// Expand model-backed visual dependencies of the prototype graph.
GraphVisuals,
/// Prepare all reachable visual/resource dependencies.
Assets,
/// Construct all object drafts before registration.
@@ -682,6 +684,7 @@ fn load_mission_with_options_and_progress(
};
let (mut prototype_graph, resolved_prototypes, mut prototype_report) =
build_prototype_graph_report(&repository, vfs.as_ref(), scoped_graph_roots);
record_load_phase(&mut trace, &mut on_phase, MissionLoadPhase::GraphVisuals);
extend_graph_report_with_visual_dependencies(
&repository,
&mut prototype_report,
@@ -693,6 +696,7 @@ fn load_mission_with_options_and_progress(
failures: prototype_report.failures.clone(),
});
}
record_load_phase(&mut trace, &mut on_phase, MissionLoadPhase::Assets);
let asset_manager = AssetManager::new(repository);
let mission_assets = match options.asset_scope {
MissionAssetScope::Full => asset_manager.prepare_mission_assets(
@@ -738,8 +742,6 @@ fn load_mission_with_options_and_progress(
.collect(),
})
.collect();
record_load_phase(&mut trace, &mut on_phase, MissionLoadPhase::Assets);
let mut new_runtime_world = new_world(WorldConfig);
let mut handles = Vec::with_capacity(mission.objects.len());
record_load_phase(&mut trace, &mut on_phase, MissionLoadPhase::Construct);
@@ -1176,6 +1178,7 @@ mod tests {
MissionLoadPhase::Map,
MissionLoadPhase::Tma,
MissionLoadPhase::Graph,
MissionLoadPhase::GraphVisuals,
MissionLoadPhase::Assets,
MissionLoadPhase::Construct,
MissionLoadPhase::Register,
+9
View File
@@ -1038,6 +1038,15 @@ to 120 seconds but remained at the existing `Graph` loading checkpoint and were
terminated without a native frame/report; therefore no new readback hash or GPU
acceptance result is claimed for the corrected projection yet.
The load trace now splits base root expansion (`Graph`) from MSH/WEAR/MAT0/TEXM
visual-dependency expansion (`GraphVisuals`) and enters `Assets` immediately
before actual asset preparation. A controlled 60-second GOG first-root run of
the XY build stopped at `GraphVisuals`; the process was terminated by the probe
and produced no frame. The startup bottleneck is therefore narrowed to visual
graph expansion, rather than the base prototype graph, asset decoding, window
creation or Vulkan submission. This is a diagnostic boundary, not a claim that
the visual expansion is semantically optional or may be skipped.
The same source-axis proof now applies to `TerrainWorld`: its `Land.msh` surface
height query and `Land.map` areal/grid lookup use XY ground coordinates, return
source Z height, and leave raycasts as full 3D intersections. The Part 1 and