Jump to content
Sign in to follow this  
nark0t1k

How test script with BIS_fnc_codePerformance

Recommended Posts

Hi everyone,

I'm looking to optimize my script according with https://community.bistudio.com/wiki/Code_Optimisation


But get some trouble for testing script with BIS_fnc_codePerformance

Anybody can explain how can i test some different script ?

 

	_handle = ["Coucou",false,5,0.01,0.26,"AinvPknlMstpSnonWnonDnon_medic_1"] spawn life_fnc_handleProgressBar;
	waitUntil {scriptDone _handle;}; 

or
 

	_handle = ["Coucou",false,5,0.01,0.26,"AinvPknlMstpSnonWnonDnon_medic_1"] spawn life_fnc_handleProgressBar;
	waitUntil {sleep 0.2;scriptDone _handle;}; 

VS
 

	_handle = ["Coucou",false,5,0.01,0.26,"AinvPknlMstpSnonWnonDnon_medic_1"] spawn life_fnc_handleProgressBar;
	for "_i" from 0 to 1 step 0 do {
		if(scriptDone _handle)exitWith {};
		sleep 0.2;
	};

???

and can i test somethink like full script (like life_fnc_handleProgressBar) ?

I try to test with

 

["[""Coucou"",false,5,0.01,0.26,""AinvPknlMstpSnonWnonDnon_medic_1""] spawn life_fnc_handleProgressBar;"] call BIS_fnc_codePerformance;

But result
9T2ykaX.png

Look like .... doesn't take time :/


Any help or tips are welcome :-)

Share this post


Link to post
Share on other sites

Thanks

Any other way to test performance about "spawn" script?

waitUntil with sleep 0.2

or

for "_i" from 0 to 1 step 0 with sleep 0.2 :/ ?

EDIT:
I'm looking about wich method use lower CPU for client :)

Edited by nark0t1k

Share this post


Link to post
Share on other sites

Any other way to test performance about "spawn" script?

Since you already seem to know about it, I suggest reading this part of the optimization page again.

 

Cheers

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×