CS2D
General
Will my server lag if there are too much scripts?
Will my server lag if there are too much scripts?
7 Antworten So my lua script files are about 350 kb and i don't know if there are too much script could make the server lag? Depends on the specs of your server.
I'm using 800kb and it's running fine.
It'll depend on what your script is using.
Mainly hook settings ect. (second, minute, ...) when i was using the 4 lua scripts from stalker mod ppl from my server was lagging every 5 seconds
Which script are you going to use? If its like an simple script its ok, But an big script idk if ur host can handle it.
But be sure to change Always to ms100 in the script you are using DC Admin
Offline
the simple answer to this questions is: yes, your server will lag with a big number of scripts.
however it's actually much more complicated. here are some facts:
the size of your script does NOT really matter. there can be a 1 kb script which leads to horrible lags and a 1 mb script which runs smoothly without any lags!
it depends on the actions you perform. every Lua or CS2D command which does something which is directly visible to clients like showing text, playing sounds, killing players, giving money or health, changing positions etc. will cause additional traffic! you can easily cause high lags by using these commands too frequently!
the other thing which can cause lags is a long Lua script execution time. this can happen when you execute very long or complicated scripts or scripts with long loops. Thank you for telling i got it now
FlooD GAME BANNED
Offline
dc do you have any suggestions on how to minimize lag from using lua scripts? (e.g. don't use the always hook) DC Admin
Offline
no, only the obvious stuff.
call commands which need to send data less often and things like that...