Browse Source

Add profiling block for Lua garbage collection.

Lasse Öörni 11 years ago
parent
commit
8bb3e649e5
1 changed files with 4 additions and 1 deletions
  1. 4 1
      Source/Urho3D/LuaScript/LuaScript.cpp

+ 4 - 1
Source/Urho3D/LuaScript/LuaScript.cpp

@@ -593,7 +593,10 @@ void LuaScript::HandlePostUpdate(StringHash eventType, VariantMap& eventData)
     }
     }
 
 
     // Collect garbage
     // Collect garbage
-    lua_gc(luaState_, LUA_GCCOLLECT, 0);
+    {
+        PROFILE(CollectLuaGarbage);
+        lua_gc(luaState_, LUA_GCCOLLECT, 0);
+    }
 }
 }
 
 
 void LuaScript::HandleConsoleCommand(StringHash eventType, VariantMap& eventData)
 void LuaScript::HandleConsoleCommand(StringHash eventType, VariantMap& eventData)