antistasi-1.x
antistasi-1.x copied to clipboard
Low AI performance with relatively high server simulation FPS
Generally diag_fps
for server doesn't give monitor FPS, but simulation FPS, and removing that check lowers limiting factor (generation on server/HC becomes uncontrollable)
https://github.com/A3Antistasi/antistasiofficial/blob/07a49f00a00a8f40336b49d3f4249a97dea4d011/AntistasiOfficial.Altis/CREATE/createOutpost.sqf#L177
See comments on changes https://github.com/A3Antistasi/antistasiofficial/commit/77554a1dec980caf26c10d5ecbd6b99cc68e238f#commitcomment-25410658
Update: apparently AS uses to many spawns/execVms, so optimization should look in that direction also.
Uhmm i'm not agree about the outpost.
My intention was just removing the frontline AI number increase. Infact deciding to spawn them or not based on diag_fps isn't a solid solution.
Warlords of the Pacific do different: teamleader always spawn, after that it run a check then decide to add or not extra units. So the spawing is delayed causing less fps drop.
@StefArma After the discussion with you regarding server fps, and your observation that actual server fps is rather high, it's the sign of over-use of spawn/execvm (produce threads, or something similar in terms of Arma game engine). From BIKI Scheduler
All scheduled scripts can run for a maximum of 3ms in a frame. Each Script that runs add's up to the total runtime and as soon as the total runtime of 3ms is reached the current script is paused and the game continues calculating everything else it needs to calculate that frame (For example sound and graphics rendering). On the next frame the scheduler again starts to run scripts for 3ms, starting with the script which hasn't been executed for the longest time.
That would explain poor AI performance with rather high simulation FPS at the same time.
Thanks to @GlennMey for hinting tools available for profiling I will just put those here for future reference