From e950892c151f3338b5092168804a28df561003b5 Mon Sep 17 00:00:00 2001 From: Hekili Date: Mon, 20 Apr 2020 15:13:41 -0400 Subject: [PATCH] Remove unnecessary table_copy in variable support to save memory/cycles. --- State.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/State.lua b/State.lua index d5fa32a40..d5d943388 100644 --- a/State.lua +++ b/State.lua @@ -3507,7 +3507,7 @@ do return db[ key ] end - + state.variable = setmetatable( {}, { __index = function( t, var ) local debug = Hekili.ActiveDebug @@ -3523,14 +3523,12 @@ do state.variable[ var ] = 0 - local varStart = debugprofilestop() - if not db[ var ] then -- if debug then Hekili:Debug( "var[%s] :: no data.\n%s", var, debugstack() ) end return 0 end - local data = table_copy( db[ var ] ) + local data = db[ var ] local parent = state.scriptID -- If we're checking variable with no script loaded, don't bother.