perf(runtime): retain more decoded payloads
Docs Deploy / Build and Deploy MkDocs (push) Successful in 37s
Test / Lint (push) Failing after 2m33s
Test / Test (push) Skipped
Test / Render parity (push) Skipped

This commit is contained in:
2026-07-18 11:49:55 +04:00
parent 781241742d
commit e166b3afff
2 changed files with 13 additions and 1 deletions
+6 -1
View File
@@ -43,6 +43,8 @@ use std::sync::Arc;
pub use fparkan_assets::MissionAssets; pub use fparkan_assets::MissionAssets;
const MISSION_DECODED_PAYLOAD_CACHE_ENTRIES: usize = 256;
/// Engine mode. /// Engine mode.
#[derive(Clone, Copy, Debug, Eq, PartialEq)] #[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum EngineMode { pub enum EngineMode {
@@ -684,7 +686,10 @@ fn load_mission_with_options_and_progress(
}) })
.collect(); .collect();
record_load_phase(&mut trace, &mut on_phase, MissionLoadPhase::Graph); record_load_phase(&mut trace, &mut on_phase, MissionLoadPhase::Graph);
let repository = CachedResourceRepository::new(vfs.clone()); let repository = CachedResourceRepository::with_payload_cache_budget(
vfs.clone(),
MISSION_DECODED_PAYLOAD_CACHE_ENTRIES,
);
let graph_roots: Vec<_> = mission let graph_roots: Vec<_> = mission
.objects .objects
.iter() .iter()
+7
View File
@@ -1101,6 +1101,13 @@ graph traversal, edge order and validation semantics. Repeating the controlled
WEAR and MAT0 expansion before timeout; its remaining bottleneck is TEXM WEAR and MAT0 expansion before timeout; its remaining bottleneck is TEXM
validation/archive work, not Vulkan submission or the base prototype graph. validation/archive work, not Vulkan submission or the base prototype graph.
Mission loading now raises the decoded-payload cache entry budget from 64 to
256 while retaining its 64 MiB byte budget. This avoids premature entry-count
eviction during resource-rich loads without making memory unbounded. The same
180-second Part 2 probe nevertheless remained at `GraphVisualTextures`; this
change is a safe cache-capacity improvement, not measured evidence of a Part 2
startup advance.
`Assets` now has four ordered diagnostic sub-checkpoints: `AssetModelMeshes` `Assets` now has four ordered diagnostic sub-checkpoints: `AssetModelMeshes`
(MSH), `AssetWearTables` (WEAR), `AssetMaterials` (MAT0) and `AssetTextures` (MSH), `AssetWearTables` (WEAR), `AssetMaterials` (MAT0) and `AssetTextures`
(diffuse TEXM and lightmaps). The callback is observational: it neither changes (diffuse TEXM and lightmaps). The callback is observational: it neither changes