Skip to content

Commit

Permalink
Change this back to 1. Removed debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Kkthnx committed Nov 17, 2024
1 parent c6976cc commit d40c13e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
19 changes: 0 additions & 19 deletions KkthnxUI/Developer/Core.lua
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
local K, C, L = KkthnxUI[1], KkthnxUI[2], KkthnxUI[3]
local Module = K:NewModule("Developer")

-- Benchmarking global vs. cached access in WoW Lua
local _G = _G
_G.fake1 = 42 -- Set up a global variable

-- Case 1: Direct global access
local start_time = debugprofilestop()
for i = 1, 1e7 do
local temp = _G.fake1
end
print("Global access:", debugprofilestop() - start_time, "ms")

-- Case 2: Cached access
local fake1 = _G.fake1
start_time = debugprofilestop()
for i = 1, 1e7 do
local temp = fake1
end
print("Cached access:", debugprofilestop() - start_time, "ms")

K.Devs = {
["Kkthnx-Area 52"] = true,
["Kkthnx-Valdrakken"] = true,
Expand Down
2 changes: 1 addition & 1 deletion KkthnxUI/Init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ function K.SetupUIScale(init)

local scale = C["General"].UIScale
if init then
local pixel = 16
local pixel = 1
local ratio = 768 / K.ScreenHeight
K.Mult = (pixel / scale) - ((pixel - ratio) / scale)
elseif not InCombatLockdown() then
Expand Down

0 comments on commit d40c13e

Please sign in to comment.