Add profileing scope around OnFrame and remove mut ref to context

This commit is contained in:
meehl committed 2026-08-24 10:48:31 +02:00
1 parent 99dd50de62
commit 2bbfd14c1b
1 file changed
+5 -2
+5 -2
View File
@@ -290,9 +290,12 @@ impl PathOfBuilding {
self.handle_subscripts()?;
call_callback::<(), ()>(&self.lua, "OnFrame", ())?;
{
profiling::scope!("lua_OnFrame");
call_callback::<(), ()>(&self.lua, "OnFrame", ())?;
}
let ctx = self.lua.app_data_mut::<Context>().unwrap();
let ctx = self.lua.app_data_ref::<Context>().unwrap();
let (layers_hash, layers) = ctx.recorder.finish();
let identical = layers_hash == self.previous_layers_hash;