Repository navigation
Faster node power - #2557
Open
kimvais wants to merge 3 commits into
Open
Faster node power#2557kimvais wants to merge 3 commits into
kimvais wants to merge 3 commits into
Conversation
Node power only reads the selected power stat, but every node calc ran the full multi-skill Full DPS pass in the tree view (the TREE override in the misc calculator), plus the EHP estimation and, for Full DPS, a main-skill pass nobody reads. Node power now goes through the fast path and asks only for what its stat needs; stats set by the EHP pass are flagged needsEHP in data.powerStatList. The per-skill Full DPS cache only diffs skill-level inputs, so it is now used only while the tree and items are unchanged (it would report 0 power for every node otherwise). Each fast-path options table gets its own reusable env, so the gem sorter and node power cannot accelerate on each other's overrides. On a 3-group Full DPS Deadeye in tree view: Offence/Defence 30 s -> 5 s, Life 91 s -> 18 s, Full DPS 89 s -> 64 s, with identical power for all 3732 nodes.
Path power needs its own calc per path (about two thirds of all node power calcs) but only the power report uses it. Every node's own power is now calculated first and powerMax published, so the heat map is complete while path power is still being filled in for the report. Progress counts both passes. On a 3-group Full DPS Deadeye the heat map is ready after 19 s instead of 61 s (Life: 7 s instead of 18 s), with identical power for all nodes. Follows up 3f3e1fd.
Meta gems and mirage spawners are Full DPS passes that can never add damage, yet node power recalculated each of them for every node. The base capture now marks a skill inert when it has no hit, DoT, minion or mirage and its pass added nothing (all DPS 0, CullMultiplier <= 1). When the tree or items change, only inert skills reuse their captured pass. On a 3-group Full DPS Deadeye each node needs 3 passes instead of 7: Full DPS power 61 s -> 36 s, heat map 19 s -> 13 s, identical power for all 3732 nodes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of the problem being solved:
Node power and the power report were very slow with Full DPS skills. In the tree view every node calc ran the full multi-skill Full DPS pass, even for stats that never read it (Life, Offence/Defence, EHP...). On top of that, every node also got an EHP estimate it didn't need, and every path got a calc before the heat map could show anything.
Three commits:
needsEHPindata.powerStatList). The per-skill Full DPS cache only diffs skill-level inputs, so it's now used only while the tree and items are unchanged. Otherwise every node would show 0 Full DPS power. Each fast-path options table also gets its own env, so the gem sorter and node power can't pick up each other's overrides.Timings on a 3-group Full DPS Glacial Lance Deadeye, tree view:
Steps taken to verify a working solution:
spec/System/TestNodePower_spec.lua: node power matches a full unaccelerated calc for Full DPS, Life and EHP; no Full DPS calc for other stats; a no-damage skill (Wind Dancer) in Full DPS is never recalculated. Checked that these tests fail on the old code and when the cache gating or the inert check is broken.Link to a build that showcases this PR:
https://poe.ninja/poe2/builds/forbiddenrites/character/kimvais-1622/Mansikka
(the poe.ninja export drops
includeInFullDPS; tick Full DPS on the three Glacial Lance groups to reproduce)Before screenshot:
N/A, performance only. See the timings above.
After screenshot:
N/A