aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-07-18 10:49:55 +0300
committerValentin Popov <valentin@popov.link>2026-07-18 10:49:55 +0300
commite166b3afffd9d6579ce01f16fea7d8e27d9b9bf0 (patch)
tree37a83e210e7bfa7c6f6d9aa9ae97e30414643fdb
parent781241742dc650353bd354868bd497d1f65011a9 (diff)
downloadfparkan-e166b3afffd9d6579ce01f16fea7d8e27d9b9bf0.tar.xz
fparkan-e166b3afffd9d6579ce01f16fea7d8e27d9b9bf0.zip
perf(runtime): retain more decoded payloads
-rw-r--r--crates/fparkan-runtime/src/lib.rs7
-rw-r--r--docs/tomes/05-render.md7
2 files changed, 13 insertions, 1 deletions
diff --git a/crates/fparkan-runtime/src/lib.rs b/crates/fparkan-runtime/src/lib.rs
index ff7beda..154d588 100644
--- a/crates/fparkan-runtime/src/lib.rs
+++ b/crates/fparkan-runtime/src/lib.rs
@@ -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()
diff --git a/docs/tomes/05-render.md b/docs/tomes/05-render.md
index 5899182..9565f22 100644
--- a/docs/tomes/05-render.md
+++ b/docs/tomes/05-render.md
@@ -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