My script is have very high Rate, it have alot Loop and my Question is : do it make a lag?
Avg. Ping is 270 - 310
Picture :
My script is have very high Rate, it have alot Loop and my Question is : do it make a lag?
Avg. Ping is 270 - 310
Picture :
I mean, it might. It lags if the frame rate is choppy.
Depends on the cost of whatever is running inside the loop. If the loop is running a costly code, it will lag. Also whether it is client or server.
For client, frame rates are choppy when lag occurs.
There have been several instances of script rate increasing indefinitely. That is probably what you encountered and this shouldn’t mean anything to you. You should only really be concerned about the activity window (how much processing your code is taking up) and performance-related problems with your code itself.
Why does it run in that rate and what makes it sleep?
It even more high when i afk 5 mins it now 15k Rate
Probability is that you have a loop that runs like this:
-- Recursion -- self-replicating into two new outputs, double the rate after wait(0.1)
local function Recursion(fun) -- starting rate: 10, will increase
wait(0.1)
spawn(function()
Recursion() -- starts running two functions at once
end)
Recursion() -- runs self
end
Recursion()
If it lags, it’s probably because you have some stacking effect on some trigger, which I have encountered before, that bursts the amount of activity.
As previously stated in colbert2677’s post, lag is not an issue from a high script rate, but high script activity. High activity is caused by a code which cost a lot.
Ty, but i already fix it with Self Module, Thanks anyway.