From 16c7d0801c45be1220021eba8921b0f435b40150 Mon Sep 17 00:00:00 2001 From: kubbo <390378816@qq.com> Date: Sat, 14 Dec 2024 18:02:56 +0800 Subject: [PATCH] =?UTF-8?q?perf(server):=20=E4=BC=98=E5=8C=96=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E6=9C=8D=E5=8A=A1=E5=99=A8=E6=80=A7=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 减少了函数调用次数和嵌套深度 -优化了部分函数的执行时间- 调整了缓存数据的获取方式 - 移除了不必要的函数调用 --- .../data/runtime/SPS/-SYS-FUNCTION.txt | 115 ++++++++++-------- 1 file changed, 67 insertions(+), 48 deletions(-) diff --git a/server/s1/LogicServer/data/runtime/SPS/-SYS-FUNCTION.txt b/server/s1/LogicServer/data/runtime/SPS/-SYS-FUNCTION.txt index f42b197..72cafe5 100644 --- a/server/s1/LogicServer/data/runtime/SPS/-SYS-FUNCTION.txt +++ b/server/s1/LogicServer/data/runtime/SPS/-SYS-FUNCTION.txt @@ -1,73 +1,92 @@ FUNCTION MIN MAX COUNT AVG SOURCE -Lua:: 0 34 22392 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:375 -+--Lua:local:func 0 1 1152 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:104 -| +--Lua:global:OnRefer 0 1 1152 0 /data/server/s1/LogicServer/data/language/LangCode.config:1 -| | +--Lua:global:GetReferPos 0 1 3 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config -| | | -| | +--Lua:field:GetGlobalData 0 1 1152 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:110 -| | | +--C:field:getStaticVar 0 1 1152 0 -| | | | -| | | +--C:: 0 1 5760 0 -| | | -| | +--C:field:createMonster 0 1 3 0 -| | | -| | +--C:: 0 1 3462 0 +Lua:: 0 11 18556 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:375 ++--Lua:local:func 1 1 1 1 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:90 +| +--Lua:field:GetCacheData 1 1 1 1 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config: | -+--Lua:local:func 1 2 3 1 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:289 -| +--C:field:sendActivityData 1 2 3 1 -| | +--Lua:: 1 2 3 1 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:375 -| | | +--Lua:global:CheckReqData 1 2 3 1 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:357 -| | | | +--Lua:field:? 0 1 3 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:222 -| | | | | +--Lua:field:GetActorData 0 1 3 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:176 -| | | | | | +--C:: 0 1 15 0 ++--Lua:local:func 1 1 3 1 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:289 +| +--C:field:sendActivityData 1 1 3 1 +| | +--Lua:: 1 1 3 1 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:375 +| | | +--Lua:global:CheckReqData 1 1 3 1 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:357 +| | | | +--Lua:local:func 1 1 3 1 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:149 +| | | | | +--Lua:global:GetBitData 0 1 27 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:109 +| | | | | | +--Lua:field:GetActorData 0 1 27 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config: | | | | | | -| | | | | +--C:: 0 1 81 0 -| | | | | -| | | | +--Lua:local:func 0 1 3 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:149 | | | | | +--Lua:global:DealClearAtvData 0 1 3 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:191 -| | | | | | +--Lua:field:GetActorData 0 1 3 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:176 -| | | | | | | +--C:: 0 1 15 0 +| | | | | | +--Lua:global:GetBitData 0 1 27 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:109 +| | | | | | | +--Lua:field:GetActorData 0 1 27 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config: | -+--Lua:global:CheckReqData 0 34 29 1 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:357 -| +--Lua:field:? 0 10 7 1 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:222 -| | +--Lua:global:GetBitData 0 1 285 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:109 -| | | +--Lua:field:GetActorData 0 1 285 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:176 -| | | | +--C:: 0 1 1425 0 -| | | | -| | | +--C:: 0 1 1097 0 -| | | -| | +--C:: 0 1 943 0 ++--Lua:local:func 0 1 650 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:251 +| +--C:field:getActorById 0 1 644 0 | | -| +--Lua:local:func 1 24 7 4 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:149 +| +--Lua:field:GetGlobalData 0 1 650 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:110 +| | +--C:: 0 1 3250 0 +| | +| +--C:local:(for generator) 0 1 1294 0 +| | +| +--Lua:field:GetActorData 0 1 640 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:176 +| | +--C:: 0 1 3200 0 +| | | +| | +--C:field:getStaticVar 0 1 640 0 +| | +| +--C:: 0 1 4116 0 +| ++--Lua:global:CheckReqData 0 11 38 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:357 +| +--Lua:field:? 0 1 7 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:222 +| | +--C:: 0 1 145 0 +| | +| +--Lua:local:func 0 11 7 2 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:149 | | +--Lua:global:GetBitData 0 1 351 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:109 | | | +--Lua:field:GetActorData 0 1 351 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:176 | | | | +--C:: 0 1 1755 0 | | | | | | | +--C:: 0 1 1315 0 | | | -| | +--C:field:writeInt 0 1 709 0 -| | | -| | +--Lua:global:DealClearAtvData 0 11 7 2 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:191 +| | +--Lua:global:DealClearAtvData 0 5 7 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:191 | | | +--Lua:global:GetBitData 0 1 351 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:109 | | | | +--Lua:field:GetActorData 0 1 351 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:176 | | | | | +--C:: 0 1 1755 0 -| | | | | -| | | | +--C:: 0 1 1315 0 -| | | -| | +--C:: 0 1 654 0 +| | | | | | +| | | | | +--C:field:getStaticVar 0 1 351 0 | | | +--Lua:local:func 0 1 3 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:110 | | +--Lua:global:getUseTimes 0 1 16 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:68 | | | +--Lua:field:GetActorData 0 1 16 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:176 | | | | +--C:: 0 1 80 0 | | -| +--Lua:local:func 0 1 11 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:156 -| | +--Lua:global:GetBitData 0 1 52 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:116 -| | | +--Lua:field:GetActorData 0 1 52 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:176 -| | | | +--C:: 0 1 260 0 +| +--Lua:local:func 0 1 15 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:156 +| | +--Lua:global:GetBitData 0 1 72 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:116 +| | | +--Lua:field:GetActorData 0 1 72 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config: | -+--Lua:global:CheckInitActivity 0 1 17 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:343 -| +--C:: 0 1 34 0 ++--Lua:local:func 0 1 650 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:176 +| +--Lua:global:nextMonthClear 0 1 650 0 /data/server/s1/LogicServer/data/language/LangCode.txt:16 +| | +--Lua:field:GetGlobalData 0 1 650 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:110 +| | | +--C:: 0 1 3250 0 +| | | +| | +--C:: 0 1 1950 0 +| ++--Lua:local:func 0 1 650 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:371 +| +--Lua:global:dealPaodianExp 0 1 650 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:254 +| | +--Lua:field:GetCacheData 0 1 650 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:143 +| | | +--C:: 0 1 3250 0 +| | | +| | +--C:: 0 1 1561 0 +| | +| +--Lua:field:GetCacheData 0 1 650 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:143 +| | +--C:field:getDyanmicVar 0 1 650 0 +| | | +| | +--C:: 0 1 3252 0 +| | +| +--Lua:global:DealAtvAreaAttr 0 1 650 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:190 +| | +--Lua:field:GetCacheData 0 1 650 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:143 +| | | +--C:field:getDyanmicVar 0 1 650 0 +| | | | +| | | +--C:: 0 1 3250 0 +| | | +| | +--C:field:getRunningActivityStartTime 0 1 650 0 +| | +| +--Lua:global:AutoBigTreasure 0 1 650 0 /data/server/s1/LogicServer/data/language/Zh-CN/TipMsg.config:156 +| | +--C:field:isReachSecondBeforeActivityEnd 0 1 650 0 +