Page MenuHomeFeedback Tracker

"ALT+TAB" causes 2.5x FPS drop from 50 to 20 in MP
Assigned, WishlistPublic

Description

When Alt+Tabbed the client would experience significant FPS drop in Multiplayer. At glance it may not look like a big deal. But if you realise that in MP there is no real suspension and connected client still needs to run scripts despite the player not looking at the screen, it becomes a major issue.

I have constructed a simple test, 100 scripts spawned every 10 seconds and measured the difference between 1st script start and last script completion. It can take up to 4 seconds for the last script to finish when Alt+Tabbed. That is without real load. With little load it could reach 12+ seconds easily.

If player alt+tabs in MP this could mess client side big time especially in script intense mission. I would understand this happening in SP but not in MP.

Details

Legacy ID
4242232348
Severity
None
Resolution
Open
Reproducibility
Always
Category
Engine
Steps To Reproduce

run this on the client

10 spawn {
while {true} do {

		_t = diag_tickTime;
		for "_i" from 1 to 100 do {
			_t spawn {
				allMissionObjects "All";
				_t = diag_tickTime - _this;
				diag_log [_this, _t, diag_fps, diag_fpsmin];
				hintSilent str [_this, _t, diag_fps, diag_fpsmin];
			};
		};
		_t = _t + _this;
		waitUntil {diag_tickTime >= _t};

};
};

note the values in hint

alt+tab and keep checking .rpt

Event Timeline

Killzone_Kid edited Additional Information. (Show Details)
Killzone_Kid set Category to Engine.
Killzone_Kid set Reproducibility to Always.
Killzone_Kid set Severity to None.
Killzone_Kid set Resolution to Open.
Killzone_Kid set Legacy ID to 4242232348.May 7 2016, 5:52 PM
Killzone_Kid edited a custom field.

Posted revised repro with a little load.

i see what you're saying, but is this not default windows/gpu behavior, to lose application priority and resources when alt-tabbing out of a game? And are spawn loops not mostly independent of frame rate, and more on cpu availability?

fps seems more of a sister-symptom than directly related - so if windows cuts down cpu priority, theres no guarantee you'll be able to execute all your spawns in any given, expected, nor reasonable time-frame - unless arma were guaranteed high or realtime(nope) cpu priority while minimised (risk being a runaway script could cripple or crash a system) - as far as i understand the situation...

i certainly respect your skills in this area tho, so if there is a fundamental concept i'm misunderstanding here, im certainly open

--

aside from the specific issue discussed, i'd like to suggest perhaps in general such high-load, time dependent scripts need to consider proper resource management -especially ensuring- they do not attempt to overload a system that cannot realistically handle the load at any given moment in time, including when minimised (there are a few simple methods to accomplish this (ex: loop scaling based on instantaneous fps.)) just my personal opinion in responsible script design.

It certainly has something to do with GPU idling when alt+tabbed. If I launch Arma 3 in window mode with -nopause flag FPS drop does not happen.

The problem here is, it is client option and by default Arma 3 runs in fullscreen mode without -nopause. I think -nopause should be forced for Multiplayer even when launched in fullscreen and not a window to keep it consistent.