High Script Rates In Developer Console?

So recently i was trying to get my GraphicsTexture Below 160.000 which is high, but i decided to check out the other tabs on the Developer Console and i checked the script tab and i saw this…

I have never used this tab before and i see high rates, is that a good thing or a bad thing(it’s probably a bad thing) And what can i do to help this situation?

You are using some scripts that runs a significantly high rate using a loop. Perhaps eliminating the rate by adding wait() would do.

Sometimes it’s fine, otherwise it’s just pure lag upon progression.

4 Likes

oh so some are fine and some build up lag as it goes… looks like i might have to do some script optimization make them run easier and faster(which i not ready for) ill see what i can do with the highest rate scripts.

@Operatik Wait is not a magic optimisation trick. Don’t use it where it’s not needed. >:(

That being said, the keyword, optimisation. Script rates have been known to climb high and there have been many threads regarding script rates. If I recall correctly, the rate relates to the execution of the script. The most you can do is optimise some of your code here and there (such as cutting down on expensive functions or bad practice).

Generally this shouldn’t be an issue for you - I personally don’t check my script rates unless I’m looking for very specific information on what may be the cause for something else (e.g. a really long bar in the MicroProfiler).

2 Likes

Hmm, you just reminded me. For some instances, you could use an event instead of a loop to check when it changes or do something with whatever you want with X.

:thinking:

I dont think you need to be worried about the script rate. Your script activity, which is how much processing it is actually taking up (and not just how often it runs), seems completely fine. It seems like what’s actually going on is that you encountered this bug: Developer console script rate increases indefinitely

3 Likes

That’s a very specific case of bad practice where you reinvent the wheel. If you want to look at it on a more broad scale, you can just simplify it down to “don’t run expensive functions in rapid succession”.

2 Likes