Profiler result's -Optimization mode
#1

I want to optimize my gamemode and I need some help.I'm put profiler plugin on my server from 01:00 to 11:23 today,so i'm get results.

So there are picture who don't want to download:
https://i.imgur.com/dYcv4Fd.png

So if you can tell me what i need to opimize,because i'm not sure what i need to look on this profiler results.For example i don't understand this:

Quote:

operator>=(Float:,Float 1515576 6.83%
operator>(Float:,Float 1281151 3.33%

Is this much?
Quote:

floatcmp 13220491 3.75%

I use floatcmp just in one line in my mode.For afk check

Short code:

Code:
function AFKCheck(playerid)
{
	GetPlayerPos(playerid, PlayerCurrentPos[playerid][0], PlayerCurrentPos[playerid][1], PlayerCurrentPos[playerid][2]);
	if(!floatcmp(PlayerCurrentPos[playerid][0], PlayerLastPos[playerid][LastX]) && !floatcmp(PlayerCurrentPos[playerid][1], PlayerLastPos[playerid][LastY]))
	{
		PovecajPVarInt(playerid, "PlayerAFK", 1);
	}
	else
	{
		SetPVarInt(playerid, "PlayerAFK", 0);
   		AFK[playerid] = false;
	}
	PlayerLastPos[playerid][LastX] = PlayerCurrentPos[playerid][0];
	PlayerLastPos[playerid][LastY] = PlayerCurrentPos[playerid][1];
	PlayerLastPos[playerid][LastZ] = PlayerCurrentPos[playerid][2];

	if(GetPVarInt(playerid, "PlayerAFK") >= 20)
	{
          //kick(afk 20 minute)
        }
       return 1;
}
Quote:

GetSpeed 790181 8.17%

This function I use in OnPlayerUpdate( if(GetSpeed > 299) kick

Code:
GetSpeed(playerid)
{
    new Float:ST[4];
    if(IsPlayerInAnyVehicle(playerid))
    GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
    else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
    ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 178.8617875;
    return floatround(ST[3]);
}
I'm upload full .html file in attachmens.Thank you
Reply


Messages In This Thread
Profiler result's -Optimization mode - by GospodinX - 28.02.2018, 10:21
Re: Profiler result's -Optimization mode - by GospodinX - 28.02.2018, 13:13
Re: Profiler result's -Optimization mode - by AmigaBlizzard - 08.06.2018, 18:36
Re: Profiler result's -Optimization mode - by Logic_ - 08.06.2018, 21:25
Re: Profiler result's -Optimization mode - by GospodinX - 21.10.2018, 15:34
Re: Profiler result's -Optimization mode - by GospodinX - 21.10.2018, 19:02

Forum Jump:


Users browsing this thread: 1 Guest(s)