Page 1 of 1

Scripts are lagging on server

Posted: Wed Dec 05, 2018 6:29 pm
by Shock
I've found that scripts are lagging on server probably because of SFDE program, maybe it loads thumbnail / description and other lags for the server while hosting.
Instead of using SFDE i've got some TXT scripts that aren't working since release version, what can i do?
even loads same like the server while enabling script.

Image

Re: Scripts are lagging on server

Posted: Wed Dec 05, 2018 6:35 pm
by Motto73
I've noticed similar delay on multiple servers having scripts enabled. Even small scripts create a noticeable lag similar to ping delay while ping stays the same all the time. It might have something to do with loading the entire script file or then it might be caused by some other change. Extension scripts really add a lot more life to SFD but if they lag this much I don't know if anyone wants to use them. The lag goes away after something like 20-30 seconds mostly but the first seconds are often really important.

Re: Scripts are lagging on server

Posted: Sun Dec 16, 2018 12:21 pm
by Gurt
From a technical standpoint loading the scripts is a one-time operation during the loading of a map, just after it's done loading and before the round starts while still showing the loading screen. The game will look for all enabled scripts and read them. How and where the scripts are stored doesn't matter because they are processed exactly the same - an input string read from a source file will be compiled and processed. Once that's done no more access to the files are performed. The compiled script is all the game cares about - this works the same as before.

If you have identified a script causing your server to slow down you should disable that script. It might be that the script has an un-optimized loop somewhere that can cause noticeable slowdowns on certain CPUs.
If you have scripts that doesn't work at all you must ask the authors to fix them.