Skip to content

Skip a duplicate skill calculation in Full DPS Power Reports - #10631

Open
AdamZ-8113 wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
AdamZ-8113:perf/standalone-guarded-full-dps
Open

AdamZ-8113 wants to merge 1 commit into
PathOfBuildingCommunity:devfrom
AdamZ-8113:perf/standalone-guarded-full-dps

Conversation

@AdamZ-8113

Copy link
Copy Markdown
Contributor

Description of the problem being solved:

A Full DPS Power Report can calculate the selected skill twice for every passive it checks: once on its own, then again when adding up Full DPS. When the selected skill is the first one counted in Full DPS and it’s safe to skip the separate calculation, this PR lets the Full DPS loop calculate it once.

Steps taken to verify a working solution:

I tested 17 builds for correctness and timed 7 of them. I first compared clean dev with and without this PR on 4 builds that had shown a benefit in earlier tests. I then timed all 7 builds with the other open Power Report changes applied to see how much time this PR still saved.

The relevant open PRs were:

  • #10313 skips Full DPS and effective hit pool calculations when the report doesn’t need them.
  • #10381 fixes incorrect results when two passives have the same text but affect the build differently.
  • #10383 skips recalculating the build when adding a passive cannot change the reported stat.

This PR reduced the average time for the first Full DPS report by 29.4% on clean dev across 4 builds, and by 10.5% across all 7 builds with the other PRs applied.

Starting version Builds timed Without this PR With this PR Seconds saved per report Percent saved
Clean dev 4 builds 27.47 s 19.38 s 8.08 s 29.4%
dev with other PRs applied Same 4 builds 21.23 s 16.31 s 4.91 s 23.2%
dev with other PRs applied All 7 builds 29.32 s 26.25 s 3.07 s 10.5%

Timing started when the first report was requested after loading the build. Each build and depth (5 and All) got equal weight. The report rows and values matched, and all 931 tests passed on clean dev with this PR applied.

Link to a build that showcases this PR:

Vaal Arc Elementalist saved 23.27 seconds on its first depth-All Full DPS report on clean dev, going from 69.65 s to 46.38 s.

The other three builds timed on clean dev were Eviscerate, Divine Blast, and Winter Orb. The seven-build comparison also included Vaal Reap, Kitava’s Thirst Crackling Lance, and Viper Strike of the Mamba.

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