196kb code causes server overload

Ok so I’ve been working on a RP gamemode for the past 2 months or so. And when i usually want to add something i just write it seperately test it and then add it to the main code. The same thing i did this time. This time the new thing was a teleportaition device (Demensional scissors). I’ve worked out all the code, created a small menu which allowed the player to switch throught the existing portals, at the activasion of a portal, a good aura and some smoke would create next to the player and at the destination of the teleport exit. Everything worked fine, all portals were working, no lag no issuses. But when i copied the code and added it to the main code, everytime i open it, it causes server overload and restarts. This is completely unacceptable since the code consists of only letters and symbols you could store on a 196kb notepad and that i opnly used 240 rules and 13.000/20.000 actions. Not being able to run such a script is completely outrageous. And what is even more disgusting is the fact that, you don’t allow players to use custom servers to running such gamemode (for exemple as minecraft does) knowing you have potato servers.
Mahalo!

Optimization is key.

Move Subroutines / Rules that don’t need to Reevaluate their Conditions to the very Bottom of the Script.

Secondly Workshop uses “Short Circuiting”.
meaning if the Conditions for “Visibility” of a Effect / Text already don’t evaluate as True the String / Size / Color / Position won’t reevaluate for that Rule.
Same goes for AND Conditions, if one of the Conditions Evaluates to False the other Conditions won’t get evaluated.

So you can reduce the Performance required by moving less Complex Conditions to the Top of the Condition List.

But keep in mind if you have for Example

Is Alive (Event Player) == True
Player Variable (Event Player). L == False

If you for Example can Rapid Kill yourself, and Player Variable L just changes every minute. (A exaggerated example)
you’d be better of changing the Order of the Conditions to

Player Variable (Event Player). L == False
Is Alive (Event Player) == True


Also OOF, THATS A HARD NECRO. Didn't notice.

EU Forums are Very Dead…