Repository navigation
Reduce RAM usage by caching single-stat Power Report scores - #10656
Open
AdamZ-8113 wants to merge 1 commit into
Open
AdamZ-8113 wants to merge 1 commit into
AdamZ-8113 wants to merge 1 commit into
Conversation
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:
Power Reports can use several GB of RAM because PoB keeps the full calculation output for each passive it scores.
A single-stat report like Hit DPS only needs the signed gain for that stat.
This PR caches that number so Lua can free the full output sooner.
The combined Offence/Defence heat map still needs several stats and keeps the full outputs. Multi-node paths still get a full calculation for the whole path. Other features like support gem sorting, item comparisons, anoints, and the Compare tab, still get full output from the shared calculator.
Steps taken to verify a working solution:
Ran each report in a fresh desktop PoB process with the same build, loadout, tree, and depth.
Hit DPS, depth All
Full DPS, depth 10
Life, depth All
upstream/dev(c93b63b49)The performance stack skips unneeded Full DPS and eHP work (#10313), skips unused cluster calculations (#10373), skips nodes that cannot affect the score (#10383), and avoids a duplicate Full DPS skill calculation (#10631). It also includes the passive cache-key fix which is critical for testing correctness (#10381).
hit-dps-power-report-comparison.mp4
This is portable to PoB2 although because of how
modKeyworks in PoB2 I don't ever observe as significant of RAM usage.Link to a build that showcases this PR:
Before screenshot:
After screenshot: