Repository navigation
Fix cache-related correctness issue in power report - #10381
AdamZ-8113 wants to merge 1 commit into
Conversation
|
This seems to be a slightly different implementation than #10377. I'm not sure which one is better. |
|
Darn. I didn't realize another PR was up for fixing the same issue. I asked Codex to run the same corpus of tests across both PRs. It looks like #10377 is faster but it still has correctness issues. Codex summary:
#10377 fixes the tested radius-jewel cases with less overhead, but this PR also addresses the remaining mastery/cluster and late-added-modifier cases. Its more selective cache sharing may be useful to reduce this PR’s overhead while retaining those fixes. |
|
Some of the performance difference could be caused by allocating a table for each node instead of building the key in-place. |
|
I tested building the key in place on two builds, and it didn't appear to be measurably faster. The label construction was virtually identical, the overall speed was ~2% slower which is probably just margin of error/smaller test sample. |
Description of the problem being solved:
The passive power report can show incorrect gains or losses because it reuses calculation results for nodes with identical modifier text, even when allocating those nodes has different effects.
This can also hide useful nodes entirely when an incorrect "0 DPS" result filters them out of the report.
This fix attempts to preserve the speed gained from caching, but in some cases I observed up to a 9% slower report. The cache now accounts for current modifiers and node/mastery type. Nodes affected by radius jewels, tattoos, or timeless-jewel transformations are calculated separately, as are nodes with structured modifiers such as granted skills. This retains reuse for equivalent nodes while calculating the affected cases separately.
In the linked Fireball build, the +10 Dexterity node directly right of Sentinel (16167) was missing from the Full DPS report. Direct calculation gives it approximately 7.69 million DPS, which the corrected report now shows.
Steps taken to verify a working solution:
Link to a build that showcases this PR:
https://pob.codes/b/GhW2hQJvqyF
Use Full DPS at depth 1 or greater and look for Dexterity node 16167, directly right of Sentinel and below the Exceptional Performance / Window of Opportunity wheel.
Before screenshot:
The Dexterity node at depth of 1 is missing

After screenshot:
Now it's displayed.
