![]() |
How to interpret ScriptProfiler - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: General Help (/Forum-General-Help) +--- Thread: How to interpret ScriptProfiler (/Thread-How-to-interpret-ScriptProfiler) |
How to interpret ScriptProfiler - darksun84 - 04-25-2012 10:53 PM After i enable the scriptprofiler , i can get the average execution times of triggers and functions that are called . So i have like this report TRIGGER '@hittry' called 171 times, took 0.2768 msec average (0.1810 min, 1.2952 max), total: 47.3731 msec Are those times influencing lag ? If i have a 6 players fighting each other, the last player will suffer a 0.2768*5 delay before his @hittry trigger will fire? RE: How to interpret ScriptProfiler - Shaklaban - 04-26-2012 02:41 AM they are in milliseconds so 0.2768 is pretty low value. but answer is yes, since sphere is single threaded all things in server stop for 0.2768 milliseconds. RE: How to interpret ScriptProfiler - darksun84 - 04-29-2012 11:46 PM ach.. well yes it's very low , but if we had to sum all the others things too ![]() ![]() RE: How to interpret ScriptProfiler - Khaos - 04-30-2012 12:48 AM Well your average was from all 171 hit tries. How long of a time period did that last? That's what you have to ask yourself. I mean yes, you'd want to optimize if you have like 100 players on at once messing around; still that time isn't too bad. RE: How to interpret ScriptProfiler - darksun84 - 04-30-2012 01:55 AM i noticed that sometimes it's better to avoid calling functions and put the code directly in the trigger ![]() RE: How to interpret ScriptProfiler - Khaos - 04-30-2012 04:32 AM For the most part yes, but not always. You really shouldn't have much worries unless you have about 200 players all in a combat sequence from what I see. Standard @HitTry is reading from a swing speed anyhow and I doubt you are going to have 50 people all executing an attack swing at the same time. |