Hello!
Im getting a huge fps drop when I use xmlNodeGetValue in dxDrawText. From 60 fps to 7 fps.
Here is my code example. Btw I use library to make GUIs.
xmlRules = xmlLoadFile( "commands/rules.xml" )
function testMyGui()
help_window = interface:dxCreateWindow(x, y, width, height, tocolor(0, 0, 0, 125), false, "Help panel", (35/1080)*sy, tocolor(0, 0, 0, 225), tocolor(255, 255, 255, 255), nil)
interface:dxAddBorder(help_window, "bottom", tocolor(255, 102, 255), 1)
interface:setActiveGUI(help_window)
interface:dxSetMovable(help_window, true)
local tabPanel = interface:dxCreateTabPanel(0.025, 0.15, 0.95, 0.8, width*0.1521, true, help_window, tocolor(0, 0, 0, 125))
local tabRules = interface:dxCreateTab(tabPanel, "Rules", tocolor(0, 0, 0, 125), nil, tocolor(255, 255, 255, 255))
local RulesBox = interface:dxCreateTextWindow(0.025, 0.05, 0.95, 0.9, true, tabRules, tocolor(0, 0, 0, 100), tocolor(255,0,0,255), tocolor(0,255,0,255), false)
interface:dxTextWindowAddText(RulesBox, xmlNodeGetValue( xmlRules ), tocolor(255, 255, 255, 255))
local tabOverview = interface:dxCreateTab(tabPanel, "Command usage", tocolor(0, 0, 0, 125), nil, tocolor(255, 255, 255, 255))
local tabCommands = interface:dxCreateTab(tabPanel, "All comannds", tocolor(0, 0, 0, 125), nil, tocolor(255, 255, 255, 255))
end
addEventHandler("onClientResourceStart", getRootElement(), testMyGui)