Skip to content

Skip unused cluster calculations in Offence/Defence mode - #10373

Open
AdamZ-8113 wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
AdamZ-8113:perf/skip-unused-cluster-power-calcs
Open

AdamZ-8113 wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
AdamZ-8113:perf/skip-unused-cluster-power-calcs

Conversation

@AdamZ-8113

Copy link
Copy Markdown
Contributor

Description of the problem being solved:

When calculating node power in Offence/Defence mode, PoB also checks cluster passives for the power report even though it doesn't use those results.

This is because Offence/Defence is a combined scoring mode with no single stat selected, but the cluster-report loop only stores a result when a single stat is selected.

The current process does this check to after the calculation has already run. This PR moves the check ahead of the cluster calculations and excludes the skipped work from the progress total.

Existing cluster power values are still cleared when switching modes, and single-stat modes such as Hit DPS retain their calculations.

Steps taken to verify a working solution:

  • Across six tested builds, median Offence/Defence calculation CPU time dropped by roughly 25-37% in profiling, 15-19% in real world tests, with identical power values.
  • Full test regression test suite passed.
  • Manually confirmed better performance through the power build timer in console. 11948ms before the change, 9981ms after.

Link to a build that showcases this PR:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant