Page MenuHomeFeedback Tracker

Vehicle enablesimulation and hideobject still impacts framerate/tick
Closed, ResolvedPublic

Description

One would think that by setting enablesimulation false; hideobject true that a vehicle would not continue to consume resources.

In this case, I spawn in many vehicles and set enablesimulation false; hideobject true on each. FPS (during - expected) drops. After script execution (after - unexpected) from 60FPS to 30FPS and stays around 30fps.
{F23731}

Details

Legacy ID
1259348884
Severity
None
Resolution
Fixed
Reproducibility
Always
Category
Performance
Steps To Reproduce

Use this repro mission which spawns the classname defined in /functions/Core/fn_test01.sqf line 9 _spawncar = "B_MBT_01_arty_F" createVehicle _pos;

https://github.com/Fankserver/ArmA3-BugSamples/tree/master/18451 [^]
Big thanks to Fank for the repro mission and simplification of my original script!

Delete all class Sounds in a vehicle's config.bin (change http://pastebin.com/PFeM3SDw [^] to class Sounds {}; for example)

Change simulation = "carx"; to simulation = "car"; in config.bin to disable Physx (old simulation from Arma 2)

Rerun the test and see that when Sounds and Physx is disabled that FPS doesn't drop with enablesimulation false.

Additional Information

Disable class Sounds (Event Handlers?) and Physx simulation on vehicles that have enablesimulation false.

Additionally one could ask for this new command:
enablephysx BOOL (which flips simulation between "car" and "carx", "ship" and "shipX" and so on) would be nice to be able to set during mission runtime

Event Timeline

zorrobyte edited Additional Information. (Show Details)
zorrobyte set Category to Performance.
zorrobyte set Reproducibility to Always.
zorrobyte set Severity to None.
zorrobyte set Resolution to Fixed.
zorrobyte set Legacy ID to 1259348884.May 7 2016, 6:26 PM
zorrobyte edited a custom field.

Additionally Manalog doesn't work with A3 (https://dev.withsix.com/issues/27636)

I assume that A3 also doesn't have diag_captureSlowFrame, diag_captureFrame,diag_logSlowFrame? RPT reports (missing ;) tried on stable and dev, command(s) listed in A3 wiki page https://community.bistudio.com/wiki/Category:Scripting_Commands_Arma_3

Would be nice if the community could submit helpful dumps/info, but such may be easier for internal BIS teams to do (to control environment).

A workaround would be to spawn/delete vehicles during mission runtime (based if player near) but would instead impact MP and netcode from packets spammed during vehicle create/delete..

Hmm.. Starting at 56FPS
C_Boat_Civil_01_police_F only drops FPS to 53
Box_NATO_Wps_F doesn't drop FPS = 56
B_MBT_01_arty_F drops FPS to 27!
B_Boat_Transport_01_F doesn't drop FPS = 56
C_Offroad_01_F drops FPS to 28!
B_Heli_Light_01_F drps fps to 53

This is using the same repo mission, spawn script.

I don't think this is Physx, maybe so but could it be the event handlers for vehicle sound? Maybe it has to do with Physx complexity?

Why not disable Physx and sound eventhandlers (or whatever is used) when enablesimulation false?

Forum topic
http://forums.bistudio.com/showthread.php?176389-enablesimulation-false-and-hideobject-true-what-else-is-simulating

interesting findings zorrobyte

Thank you a lot for the investigation, zorrobyte. I tried all the vehicles in your note, but the FPS stayed the same for me.

Could you please provide me with repro steps as exact as possible? It may be that I use different init for vehicles or other aspects I cannot think of now.

Thank you very much.

Fank added a subscriber: Fank.May 7 2016, 6:26 PM
Fank added a comment.Apr 18 2014, 11:31 AM

Base FPS: 32-33

Starting spawning C_Offroad_01_F: 10 FPS (during spawn) 14-15 FPS (after spawning)
Same with hideobject false & enablesimulationglobal false:
8 FPS (during spawn) 12-13 FPS (after spawning)

Starting spawning B_MBT_01_arty_F: 3-5 FPS (during spawn) 14-15 FPS (after spawning)
Same with hideobject false & enablesimulationglobal false:
2-4 FPS (during spawn) 13-14 FPS (after spawning)

Fank added a comment.Apr 18 2014, 11:38 AM

HW Information:
CPU: AMD Phenom(tm) II X6 1090T
MB: Gigabyte 990FXA-UD7
RAM: 16GB
HDD: -
GPU: 2x NVIDIA GTX760 (SLI) on 3x 1080p (Triple head)
All HDD's are connected via ISCSI on a 10GBit, no problem in other games.

Offtopic answer: related to text in first comment on this ticket
http://feedback.arma3.com/view.php?id=18451#c69103
only DEV branch of Arma 3 and PROF branches (used as counterpart to PERF branch) contain the debug layer for those diag_ commands

Ok guys,

I was finally able to reproduce it with a big help of Fank (thank you thank you thank you). It wasn't working for me before.

Assigning to responsible department, thank you all very much!

Very cool, good work everyone!

This also seems to happen with Units as well!
http://forums.bistudio.com/showthread.php?176389-enablesimulation-false-and-hideobject-true-what-else-is-simulating&p=2670115&viewfull=1#post2670115

For example change in spawnpos.sqf:

_civcarpool = [
"C_SUV_01_F"
];

_indcarpool = [
"C_SUV_01_F"
];

_milcarpool = [
"C_SUV_01_F"

One could modify the calls to be all _civcarpool instead:
[_civcarpool,_industrial,true,"ColorYellow"] call _car_spawn;
[_civcarpool,_military,true,"ColorRed"] call _car_spawn;
[_civcarpool,_civ,true,"ColorGreen"] call _car_spawn;

And then just plop classname in:
_civcarpool = [
"C_SUV_01_F"
];

Not a very specific repro script I admit however it works to duplicate the issue.

Machine info:
2500K @ 4.8GHZ
8GB RAM
Nvidia GTX 670 (OC)
2x Samsung 840 EVO 250GB in RAID0

Nice, very much appreciated Frank!

I've done some experimenting with this addon: http://www.armaholic.com/page.php?id=24517 (for easy modification of config.bin)

FPS no vehicles: 53
FPS spawned vehicles (stock config.bin): 27
FPS stripped config sounds: 34

7 FPS gain by stripping class sounds from the config.bin which would mean that sounds for vehicles are not disabled when enablesimulation false. Don't know if sounds are handled by an eventhandlers system or otherwise. Will be a good place to start.

Will update as I experiment more.

Duping to #18566, as RCA is in there.

Update/patch 1.18

Issue seems to be resolved. FPS only drops a few which is understandable.

Was confused with enablesimulationgloabl vs enablesimulation. enablesimulationglobal only works from SERVER (dedicated) machine, not from editor.

Anyway, enablesimulation before patch 1.18 was dropping FPS and as of now FPS only drops a few frames which is a massive improvement.

Bravo BIS for fixing this issue so quickly! Please keep ticket open while Fank and others can duplicate results to make sure issue resolved.

Iceman added a comment.May 2 2014, 9:27 AM

Hello,

thank you for the feedback. I am resolving the issue as fixed. Comments are not closed so if it reappears or there is another need of typing a note, please feel free.

Thank you very much.

Shameless plug of AI "caching" which is somewhat related to this issue but may be a different beast entirely: http://feedback.arma3.com/view.php?id=18734

As for THIS specific issue, it seems resolved with only a few FPS drop which is understandable and a MASSIVE improvement. It's a shame that how this issue was fixed cannot be disclosed (for curiosity sake) but it is resolved nonetheless.

YOU GUYS ROCK!!

13-05-2014
EXE rev. 124294
Size: ~83 MB
http://goo.gl/4KAfxB
...
"Minor PhysX optimization"
...

FPS before spawning "C_Offroad_01_F": 59
FPS after spawning "C_Offroad_01_F": 59

I then went though and SPAMMED the script and spawned a few thousand vehicles in (random class names):
59 FPS

Glad to see it works!

Zed added a comment.May 15 2014, 7:56 PM

Was interested on how it would perform on my system so I ran franks repo.

B_MBT_01_arty_F
1.18.124200: 50 FPS -> 18 FPS
1.19.124318: 52 FPS -> 15 FPS

And it crashed with C_Offroad_01_F every time I tried on dev and stable

Full rpt files and dxdiag: http://goo.gl/A3rjeu

Fank added a comment.May 15 2014, 8:05 PM

@Zed could you please create a new ticket for the crashes?

MadDogX added a subscriber: MadDogX.May 7 2016, 6:26 PM

Mass closing tickets marked as resolved more than 1 month ago.

If the issue is in fact not resolved, please create a new ticket referencing this one and ask for it to be re-opened.