Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Medical - optimize handle damage caching #6657

Merged
merged 4 commits into from Nov 1, 2018

Conversation

commy2
Copy link
Contributor

@commy2 commy2 commented Oct 29, 2018

When merged this pull request will:

  • title
  • cuts back on excessive PFH use, making missions that run long reach the PFH limit

@commy2 commy2 added the kind/enhancement Release Notes: **IMPROVED:** label Oct 29, 2018
@commy2 commy2 added this to the 3.13.0 milestone Oct 29, 2018
@commy2
Copy link
Contributor Author

commy2 commented Oct 29, 2018

   if (diag_frameno >= _frameno + 2) then {

Shouldn't this be actually two frames later, despite the comment saying 3?

@PabstMirror
Copy link
Contributor

On a single frame, does handleDamage come before or after PFEHs are run?
Not sure if it matters or not, but it might be why we thought it was 3

@PabstMirror
Copy link
Contributor

Could also use CBA_fnc_waitUntilAndExecute if we wanted to keep identical logic

@commy2
Copy link
Contributor Author

commy2 commented Oct 30, 2018

Could also use CBA_fnc_waitUntilAndExecute if we wanted to keep identical logic

But execNextFrame is extremely simple. Just an if and a pushBack. I really like stacking execNextFrame if it is ~2-4 frames delay.

@commy2
Copy link
Contributor Author

commy2 commented Oct 30, 2018

Not sure if it matters or not, but it might be why we thought it was 3

If you would've used diag_log diag_frameNo in HandleDamage and this one, it would still be a difference of two frames, regardless which comes first.

@PabstMirror PabstMirror changed the title optimize handle damage caching Medical - optimize handle damage caching Oct 30, 2018
Copy link
Contributor

@PabstMirror PabstMirror left a comment

Choose a reason for hiding this comment

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

seems to function identically to old way
might be a little less overhead this way too

@PabstMirror PabstMirror merged commit 8541716 into master Nov 1, 2018
@PabstMirror PabstMirror deleted the optimize-handledamage-caching branch November 1, 2018 18:06
@commy2
Copy link
Contributor Author

commy2 commented Nov 2, 2018

yay

@PabstMirror PabstMirror modified the milestones: 3.13.0, 3.12.4 Nov 9, 2018
BaerMitUmlaut pushed a commit that referenced this pull request Aug 5, 2019
* optimize handle damage caching

* delete some rogue code

* it was 2 all along

* add calls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants