Skip to content

Misc. - Replace configProperties wherever possible#11265

Merged
PabstMirror merged 12 commits intomasterfrom
misc-optimise-configProperties
Feb 1, 2026
Merged

Misc. - Replace configProperties wherever possible#11265
PabstMirror merged 12 commits intomasterfrom
misc-optimise-configProperties

Conversation

@johnb432
Copy link
Contributor

When merged this pull request will:

  • Title - command is slower than configClasses.

IMPORTANT

  • If the contribution affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
  • Development Guidelines are read, understood and applied.
  • Title of this PR uses our standard template Component - Add|Fix|Improve|Change|Make|Remove {changes}.

@johnb432 johnb432 added this to the 3.20.3 milestone Jan 29, 2026
@johnb432 johnb432 added the kind/optimization Release Notes: **IMPROVED:** label Jan 29, 2026
@@ -18,8 +18,9 @@

private _currentWeapon = currentWeapon ACE_player;
if !(GVAR(launcherWeapons) getOrDefaultCall [_currentWeapon, {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might even be able to remove the cache, as it's quite quick.

@johnb432
Copy link
Contributor Author

I think at this point I'll come up with a test suite for checking the difference between configClasses and configProperties regarding subclasses.

* Code cleanup

* Revert _ammo changes

* Update fnc_onFiredGetArgs.sqf
@PabstMirror
Copy link
Contributor

2.22 will add a syntax for https://community.bistudio.com/wiki/configClasses
that will handle includeInherited

@johnb432
Copy link
Contributor Author

johnb432 commented Jan 30, 2026

I've just noticed the default for configProperties returning inherited entries is true, not false - I need to look at this whole PR again.

@johnb432 johnb432 marked this pull request as draft January 30, 2026 18:34
@johnb432 johnb432 marked this pull request as ready for review January 30, 2026 19:16
} else {
private _condition = format ["getText (_x >> 'hitpointName') == '%1'", _hitpoint];
private _entry = configProperties [_itemInfo >> "HitpointsProtectionInfo", _condition] param [0, configNull];
private _entry = configProperties [_itemInfo >> "HitpointsProtectionInfo", "getText (_x >> 'hitpointName') == _hitpoint"] param [0, configNull];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hate that this works

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it's faster, so there's that!

@PabstMirror
Copy link
Contributor

If it's something where inheritance is impossible, then configClasses should be safe

e.g. medical_gui
configProperties [configFile >> QEGVAR(medical_treatment,actions), "isClass _x"];

@johnb432
Copy link
Contributor Author

If it's something where inheritance is impossible, then configClasses should be safe

e.g. medical_gui configProperties [configFile >> QEGVAR(medical_treatment,actions), "isClass _x"];

With the latest commit I believe I have replaced all instances of configProperties that can be replaced, bar instances in advanced_ballistics, for which I'm making a separate PR.

@PabstMirror PabstMirror merged commit f2515fd into master Feb 1, 2026
3 checks passed
@PabstMirror PabstMirror deleted the misc-optimise-configProperties branch February 1, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/optimization Release Notes: **IMPROVED:**

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants