lua: the cache says what it did, and takes an off switch
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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SgstFWtn1RxEJ5kVrpgYwn
This commit is contained in:
@@ -366,6 +366,10 @@ pub(crate) fn run_pending_entry_load(world: &mut World) {
|
||||
world.remove_resource::<PendingEntryUiLoad>();
|
||||
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!(
|
||||
|
||||
Reference in New Issue
Block a user