ACE3 icon indicating copy to clipboard operation
ACE3 copied to clipboard

[optimization] ace medical init advanced and basic JIP variable

Open havena opened this issue 10 years ago • 6 comments

ACE3 Version: 3.4.2 ARMA 3 Version: 1.54.133741

Mods: @CBA_A3 @ace

Placed ACE3 Modules: None

Description: ace_medical init all medical variable and spam JIPqueue on server startup / server network for nothing. This create a huge amazing jipqueue with 100/200 players. https://github.com/acemod/ACE3/blob/master/addons/medical/functions/fnc_init.sqf

maybe add conditions for init advanced jip var only if ace_medic is set to advanced, and same for basic var.

Steps to reproduce: use ace_medical basic and look at #exportJIPqueue

exemple :

Type_272 - id (time = 0.150)
    name (String) = ace_medical_triagelevel
    object (Ref) = creator:7 networkId:142

Type_272 - id (time = 0.150)
    name (String) = ace_medical_fractures
    object (Ref) = creator:7 networkId:142

Type_272 - id (time = 0.150)
    name (String) = ace_medical_lastuniquewoundid
    object (Ref) = creator:7 networkId:142

Type_272 - id (time = 0.150)
    name (String) = ace_medical_internalwounds
    object (Ref) = creator:7 networkId:142

Type_272 - id (time = 0.150)
    name (String) = ace_medical_bandagedwounds
    object (Ref) = creator:7 networkId:142

Type_272 - id (time = 0.150)
    name (String) = ace_medical_openwounds
    object (Ref) = creator:7 networkId:142

Type_272 - id (time = 0.150)
    name (String) = ace_medical_tourniquets
    object (Ref) = creator:7 networkId:142

havena avatar Jan 16 '16 15:01 havena

Possible idea for optimization: launch a global medicalReset event on unit init, and have each client set all these variables localy. That way only one publicVariableis required instead of ~20.

nicolasbadano avatar Jan 16 '16 19:01 nicolasbadano

^ This has to consider JIP though. Another effect of setVariable public is that the last value set will be set on JIP as well, which wouldn't happen with a global setVariable.

commy2 avatar Jan 16 '16 20:01 commy2

Though, thank you for your report!

True, that complicates things quite a lot. The only way around that I see would depend on reseting all units locally on JIP init before any public variables arrive from the server, but I don't think that could be done reliably.

nicolasbadano avatar Jan 17 '16 00:01 nicolasbadano

priority would be to set only the variables used for the ACE Medical level !

example : ace_medical_fractures is not used in basic medic.

the aim being to reduce variable broadcasted.

havena avatar Jan 25 '16 16:01 havena

priority would be to set only the variables used for the ACE Medical level !

Sure, that could help a lot for basic medical, but almost nothing for advanced.

nicolasbadano avatar Jan 25 '16 16:01 nicolasbadano

Systems are being merged. there are some unused variables that could be removed (and will be), but I don't see much gain compared to the necessary amount of time spend to take it further.

thojkooi avatar Jun 18 '16 10:06 thojkooi