The more things you compute the more time your server needs. You have <20ms per frame to execute your code, that should be enough if your code isn't crap.
As long you don't use 9000 addhook's everything's fine, on their own they'll probably never be a problem, but the code executed in those hooks will lag your server eventually.
I got like 150 addhooks. Some of them are repeated like seconds and minutes. Will the server lagg lesser if i put the function into a function who got and addhook per second, and remove the functions addhook i have putted into the other function. If you know what i meant.
@ Promaster: I think it's the same thing. You are calling the function anyway... If you want better performance you will have to modify the function's code.
@ Promaster: I think it's the same thing. You are calling the function anyway... If you want better performance you will have to modify the function's code.
you mean like i should make a funtion all together?
If you put all functions in a single hook then there will be a tiny difference, because CS2D is not really efficient when calling Lua functions. Nevertheless it's only 150 hooks so the difference won't be noticable (I think).
so there is nothing I can do on my code that makes it lagg lesser? Cause I got like good internet (100mb/s download and 10mb/s upload speed) and still, people who joins pings more than 200 and some even got the screen frozen and get kicked out.