perf(runtime): retain more decoded payloads
This commit is contained in:
@@ -43,6 +43,8 @@ use std::sync::Arc;
|
||||
|
||||
pub use fparkan_assets::MissionAssets;
|
||||
|
||||
const MISSION_DECODED_PAYLOAD_CACHE_ENTRIES: usize = 256;
|
||||
|
||||
/// Engine mode.
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
pub enum EngineMode {
|
||||
@@ -684,7 +686,10 @@ fn load_mission_with_options_and_progress(
|
||||
})
|
||||
.collect();
|
||||
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
|
||||
.objects
|
||||
.iter()
|
||||
|
||||
@@ -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
|
||||
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`
|
||||
(MSH), `AssetWearTables` (WEAR), `AssetMaterials` (MAT0) and `AssetTextures`
|
||||
(diffuse TEXM and lightmaps). The callback is observational: it neither changes
|
||||
|
||||
Reference in New Issue
Block a user