From a48dc95586159e6991958687c67c4732b2dc0902 Mon Sep 17 00:00:00 2001 From: grom Date: Sun, 18 Oct 2026 19:42:39 -0600 Subject: [PATCH] lua: the cache says what it did, and takes an off switch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two small things the chunk cache needed to be trustworthy on a machine I cannot watch. `WOW_LUA_CACHE=0` turns it off without a rebuild — a cache earns a kill switch, and it is also how its own saving is measured. And every in-game UI load now logs what it did, beside the load's own cost: ui_script: lua chunks: 0 compiled in 0 ms, 1591 loaded from cache in 157 ms ui_script: in-game UI up in … ms because "the cache is installed" and "the cache is working" turned out to be different claims, and the first build of it satisfied only the first. A capture run resolves no state folder, so it has no cache and compiles everything — which is right (a capture writes no player state) and worth knowing before reading one of those logs as a regression. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01SgstFWtn1RxEJ5kVrpgYwn --- crates/benilla-app/src/ui_script/lifecycle.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/benilla-app/src/ui_script/lifecycle.rs b/crates/benilla-app/src/ui_script/lifecycle.rs index 3cfe25e0..7828d93c 100644 --- a/crates/benilla-app/src/ui_script/lifecycle.rs +++ b/crates/benilla-app/src/ui_script/lifecycle.rs @@ -366,6 +366,10 @@ pub(crate) fn run_pending_entry_load(world: &mut World) { world.remove_resource::(); let start = std::time::Instant::now(); load_ingame_ui_on_world_entry(world); + // What the chunk cache did for this load, beside the load's own cost: a cache that is + // installed and a cache that is working are different claims, and this is the line that tells + // them apart on the player's machine. + info!("ui_script: {}", benilla_ui::script::chunk_cache_line()); // Every entry logs the load's cost, whether the cover hid it, and the session every // `VmMemo` keys on. info!(