From 692e530867fdd6898b1f218fb8c688cd5e936a1d Mon Sep 17 00:00:00 2001 From: meehl <12648828+meehl@users.noreply.github.com> Date: Thu, 27 Aug 2026 16:34:40 +0200 Subject: [PATCH] Add profiling scope for call to OnInit --- src/pob.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pob.rs b/src/pob.rs index 7144772..9052dd3 100644 --- a/src/pob.rs +++ b/src/pob.rs @@ -147,7 +147,10 @@ impl PathOfBuilding { fn launch(lua: &Lua, script_dir: &Path) -> LuaResult<()> { change_working_directory(script_dir)?; lua.load(script_dir.join("Launch.lua")).exec()?; - call_callback::<(), ()>(lua, "OnInit", ())?; + { + profiling::scope!("OnInit"); + call_callback::<(), ()>(lua, "OnInit", ())?; + } Ok(()) }