mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-04-29 18:59:20 +02:00
Version 2.4.1 - performance improvements, small bug fixes, graphs
This commit is contained in:
parent
82018bf3c9
commit
1729e7d635
BIN
data/images/loading.png
Normal file
BIN
data/images/loading.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
@ -9,6 +9,7 @@ local render = nil
|
||||
local atlas = nil
|
||||
local adaptiveRender = nil
|
||||
local slowMain = nil
|
||||
local slowRender = nil
|
||||
local widgetsInfo = nil
|
||||
|
||||
local updateEvent = nil
|
||||
@ -37,6 +38,7 @@ function init()
|
||||
atlas = statsWindow:recursiveGetChildById('atlas')
|
||||
adaptiveRender = statsWindow:recursiveGetChildById('adaptiveRender')
|
||||
slowMain = statsWindow:recursiveGetChildById('slowMain')
|
||||
slowRender = statsWindow:recursiveGetChildById('slowRender')
|
||||
widgetsInfo = statsWindow:recursiveGetChildById('widgetsInfo')
|
||||
|
||||
lastSend = os.time()
|
||||
@ -166,7 +168,7 @@ function sendStats()
|
||||
end
|
||||
|
||||
function update()
|
||||
updateEvent = scheduleEvent(update, 200)
|
||||
updateEvent = scheduleEvent(update, 20)
|
||||
if lastSend + sendInterval < os.time() then
|
||||
sendStats()
|
||||
end
|
||||
@ -175,26 +177,37 @@ function update()
|
||||
return
|
||||
end
|
||||
|
||||
statsWindow.debugPanel.sleepTime:setText("GFPS: " .. g_app.getGraphicsFps() .. " PFPS: " .. g_app.getProcessingFps() .. " Packets: " .. g_game.getRecivedPacketsCount() .. " , " .. (g_game.getRecivedPacketsSize() / 1024) .. " KB")
|
||||
statsWindow.debugPanel.luaRamUsage:setText("Ram usage by lua: " .. gcinfo() .. " kb")
|
||||
local adaptive = "Adaptive: " .. g_adaptiveRenderer.getLevel() .. " | " .. g_adaptiveRenderer.getDebugInfo()
|
||||
adaptiveRender:setText(adaptive)
|
||||
atlas:setText("Atlas: " .. g_atlas.getStats())
|
||||
render:setText(g_stats.get(2, 10, true))
|
||||
mainStats:setText(g_stats.get(1, 5, true))
|
||||
dispatcherStats:setText(g_stats.get(3, 5, true))
|
||||
luaStats:setText(g_stats.get(4, 5, true))
|
||||
luaCallback:setText(g_stats.get(5, 5, true))
|
||||
slowMain:setText(g_stats.getSlow(3, 10, 10, true) .. "\n\n\n" .. g_stats.getSlow(1, 20, 20, true))
|
||||
widgetsInfo:setText(g_stats.getWidgetsInfo(10, true))
|
||||
|
||||
if g_proxy then
|
||||
local text = ""
|
||||
local proxiesDebug = g_proxy.getProxiesDebugInfo()
|
||||
for proxy_name, proxy_debug in pairs(proxiesDebug) do
|
||||
text = text .. proxy_name .. " - " .. proxy_debug .. "\n"
|
||||
iter = (iter + 1) % 8 -- some functions are slow (~5ms), it will avoid lags
|
||||
if iter == 0 then
|
||||
statsWindow.debugPanel.sleepTime:setText("GFPS: " .. g_app.getGraphicsFps() .. " PFPS: " .. g_app.getProcessingFps() .. " Packets: " .. g_game.getRecivedPacketsCount() .. " , " .. (g_game.getRecivedPacketsSize() / 1024) .. " KB")
|
||||
statsWindow.debugPanel.luaRamUsage:setText("Ram usage by lua: " .. gcinfo() .. " kb")
|
||||
elseif iter == 1 then
|
||||
local adaptive = "Adaptive: " .. g_adaptiveRenderer.getLevel() .. " | " .. g_adaptiveRenderer.getDebugInfo()
|
||||
adaptiveRender:setText(adaptive)
|
||||
atlas:setText("Atlas: " .. g_atlas.getStats())
|
||||
elseif iter == 2 then
|
||||
render:setText(g_stats.get(2, 10, true))
|
||||
mainStats:setText(g_stats.get(1, 5, true))
|
||||
dispatcherStats:setText(g_stats.get(3, 5, true))
|
||||
elseif iter == 3 then
|
||||
luaStats:setText(g_stats.get(4, 5, true))
|
||||
luaCallback:setText(g_stats.get(5, 5, true))
|
||||
elseif iter == 4 then
|
||||
slowMain:setText(g_stats.getSlow(3, 10, 10, true) .. "\n\n\n" .. g_stats.getSlow(1, 20, 20, true))
|
||||
elseif iter == 5 then
|
||||
slowRender:setText(g_stats.getSlow(2, 10, 10, true))
|
||||
elseif iter == 6 then
|
||||
--disabled because takes a lot of cpu
|
||||
--widgetsInfo:setText(g_stats.getWidgetsInfo(10, true))
|
||||
elseif iter == 7 then
|
||||
if g_proxy then
|
||||
local text = ""
|
||||
local proxiesDebug = g_proxy.getProxiesDebugInfo()
|
||||
for proxy_name, proxy_debug in pairs(proxiesDebug) do
|
||||
text = text .. proxy_name .. " - " .. proxy_debug .. "\n"
|
||||
end
|
||||
statsWindow.debugPanel.proxies:setText(text)
|
||||
end
|
||||
statsWindow.debugPanel.proxies:setText(text)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -24,12 +24,11 @@ MainWindow
|
||||
margin: 0 0 0 0
|
||||
padding: 25 3 3 3
|
||||
opacity: 0.9
|
||||
|
||||
$mobile:
|
||||
size: 550 300
|
||||
@onEnter: modules.client_stats.toggle()
|
||||
@onEscape: modules.client_stats.toggle()
|
||||
|
||||
$mobile:
|
||||
size: 550 300
|
||||
|
||||
ScrollablePanel
|
||||
id: debugPanel
|
||||
@ -103,7 +102,7 @@ MainWindow
|
||||
|
||||
DebugText
|
||||
id: widgetsInfo
|
||||
text: -
|
||||
text: Disabled, edit stats.lua to enable
|
||||
|
||||
DebugLabel
|
||||
!text: tr('Slow main functions')
|
||||
@ -111,6 +110,13 @@ MainWindow
|
||||
DebugText
|
||||
id: slowMain
|
||||
text: -
|
||||
|
||||
DebugLabel
|
||||
!text: tr('Slow render functions')
|
||||
|
||||
DebugText
|
||||
id: slowRender
|
||||
text: -
|
||||
|
||||
VerticalScrollBar
|
||||
id: debugScroll
|
||||
|
@ -122,7 +122,7 @@ context.findPath = function(startPos, destPos, maxDist, params)
|
||||
marginMin
|
||||
marginMax
|
||||
]]--
|
||||
if startPos.z ~= destPos.z then
|
||||
if not destPos or startPos.z ~= destPos.z then
|
||||
return
|
||||
end
|
||||
if type(maxDist) ~= 'number' then
|
||||
|
@ -134,6 +134,8 @@ MainWindow
|
||||
!text: tr('Shop')
|
||||
size: 750 500
|
||||
@onEscape: modules.game_shop.hide()
|
||||
$mobile:
|
||||
size: 500 360
|
||||
|
||||
Panel
|
||||
id: infoPanel
|
||||
|
@ -182,6 +182,8 @@ GameBotProtection = 99
|
||||
GameFasterAnimations = 101
|
||||
GameCenteredOutfits = 102
|
||||
GameSendIdentifiers = 103
|
||||
GameWingsAndAura = 104
|
||||
GamePlayerStateU32 = 105
|
||||
|
||||
GamePacketSizeU32 = 110
|
||||
GamePacketCompression = 111
|
||||
|
BIN
otclient_dx.exe
BIN
otclient_dx.exe
Binary file not shown.
BIN
otclient_gl.exe
BIN
otclient_gl.exe
Binary file not shown.
BIN
otclient_linux
BIN
otclient_linux
Binary file not shown.
BIN
otclientv8.apk
BIN
otclientv8.apk
Binary file not shown.
BIN
pdb/pdb.7z
BIN
pdb/pdb.7z
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user