[REP++] Optimization tips & tricks help
#9

Quote:
Originally Posted by Yashas
View Post
500 players? Lets say on average, a player uses a command every minute. So 500 players will use, 500*8 commands which means CallLocalFunction is called 4000 times by ZCMD.

So its not because of the commands. Its your script which is doing shitlod of CallLocalFunction calls.

CallLocalFunction, in my opinion is the most useless function unless you are going to execute functions at runtime which are not known during compile-time (like ZCMD).

I can't think of any other reason why you would want to use CallLocalFunction in your script. CallRemoteFunction is acceptable since anyone could be using it for cross-script communication but CallLocalFunction?

I really doubt if you are even speaking the truth.

Lets say on average, a player sends 10 player updates per second. 8 minutes is equivalent to 480 seconds.

So total OnPlayerUpdate calls = 10 * 480 * 500 = 2,400,000 which is approximately twice the value you mentioned.

This is unimaginable that you have 1 million CallLocalFunction calls with your OnPlayerUpdate being empty.

Or you have an insane loop which executes CallLocalFunction too many times or you have a timer which runs every 50ms which makes CallLocalFunction calls.

Another seemingly legitmate explanation could be that "someone used a keybinder to spam commands". A keybinder can send around 25 commands per second.

A single player can send 12,000 commands per second. If each and every player used keybinder in your server to spam commands, then it will be just 6 million.

Even this possibility is ruled out.
It doesnt matter if his OnPlayerUpdate is empty, it's probably a hook from a not well written include or something.
Maybe even more than just one hook, that number of calls is not hard to achieve with that many players.
Reply


Messages In This Thread
[REP++] Optimization tips & tricks help - by buburuzu19 - 23.03.2016, 15:22
Re: [REP++] Optimization tips & tricks help - by IstuntmanI - 23.03.2016, 16:17
Re: [REP++] Optimization tips & tricks help - by PrO.GameR - 23.03.2016, 21:39
Re: [REP++] Optimization tips & tricks help - by Pottus - 23.03.2016, 22:20
Re: [REP++] Optimization tips & tricks help - by IstuntmanI - 23.03.2016, 22:49
Re: [REP++] Optimization tips & tricks help - by Golden96 - 23.03.2016, 22:55
Re: [REP++] Optimization tips & tricks help - by Pottus - 24.03.2016, 01:30
Re: [REP++] Optimization tips & tricks help - by Yashas - 24.03.2016, 06:38
Re: [REP++] Optimization tips & tricks help - by NaS - 24.03.2016, 07:21
Re: [REP++] Optimization tips & tricks help - by PrO.GameR - 24.03.2016, 09:07
Re: [REP++] Optimization tips & tricks help - by Yashas - 24.03.2016, 12:44

Forum Jump:


Users browsing this thread: 3 Guest(s)