Skip to content

Faster node power - #2557

Open
kimvais wants to merge 3 commits into
PathOfBuildingCommunity:devfrom
kimvais:faster-node-power
Open

kimvais wants to merge 3 commits into
PathOfBuildingCommunity:devfrom
kimvais:faster-node-power

Conversation

@kimvais

@kimvais kimvais commented Oct 4, 2026

Copy link
Copy Markdown

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:

  1. Skip unneeded calc passes in node power. Node power only reads the selected stat, so it now asks the calculator for just that: Full DPS only for the Full DPS stat, and the EHP estimate only for the 7 stats that need it (flagged needsEHP in data.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.
  2. Show the heat map before path power. Path power is about two thirds of all node power calcs, and only the report uses it. Every node's own power is now calculated first, so the heat map is complete early; path power fills in afterwards.
  3. Reuse base results for Full DPS skills that deal no damage. Meta gems and mirage spawners (Mirage Deadeye, Mirage Archer...) have no hit, DoT, minion or mirage, and add nothing to Full DPS. They're marked inert in the base capture and not recalculated per node.

Timings on a 3-group Full DPS Glacial Lance Deadeye, tree view:

Stat Before After (heat map / report)
Full DPS 89 s 13 s / 36 s
Life 91 s 7 s / 18 s
EHP ~90 s 5 s / 15 s
Offence/Defence 30 s 5 s / 5 s

Steps taken to verify a working solution:

  • Dumped every node's power (singleStat, pathPower, offence, defence) before and after, for Offence/Defence, Full DPS and Life. Identical for all 3732 nodes on two variants of the build.
  • New 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.
  • Full busted suite passes (908).

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

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.
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