HIGH CPU usage
#10

more than 100% CPU usage?
That is heavy

Well we cant tell you what specific problem there is with ur script but as already mentioned the code u posted is not that "bad" to cause such an usage!

Are u using mysql to save data? If so do u free the result after a SELECT process?
Optimized string lenghts? (would affect ur RAM at the first place) etc.etc.

Well, you definitly shouldnt save players data using the OnPlayerUpdate callback! (as it is executed 32 times per second!!)
If you want to save it also during the gameplay i would suggest you a timer (intervall about 5-15 mins?)

But really check this out my friend

==>https://sampforum.blast.hk/showthread.php?tid=57018
Reply


Messages In This Thread
HIGH CPU usage - by Oh - 02.01.2012, 18:42
Re: HIGH CPU usage - by DarkKillerWithPride<3 - 02.01.2012, 18:49
Re: HIGH CPU usage - by Oh - 02.01.2012, 18:52
Re: HIGH CPU usage - by Thunderbolt - 02.01.2012, 19:21
Re: HIGH CPU usage - by Babul - 02.01.2012, 19:25
Re: HIGH CPU usage - by woot - 02.01.2012, 19:27
Re: HIGH CPU usage - by Bakr - 02.01.2012, 19:41
Re: HIGH CPU usage - by Steven82 - 02.01.2012, 19:49
Re: HIGH CPU usage - by Bakr - 02.01.2012, 19:51
Re: HIGH CPU usage - by BlackWolf120 - 02.01.2012, 20:03

Forum Jump:


Users browsing this thread: 1 Guest(s)