Repository navigation
Speed up Full DPS comparisons by caching trigger source calculations (Kitava’s Thirst) - #10386
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
… early in calculator comparisons Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Related to #5713 -- I haven't noticed UI lag anymore but the calcs run so slow it feels like they won't complete.
Description of the problem being solved:
When Kitava's Thirst is equipped, especially with multiple skills socketed into it, "Full DPS" calcs take several minutes to complete. This PR speeds things up 3-4x.
This happens because with Kitava's Thirst, finding the trigger source means fully calculating every other skill in the build to see which one pays enough mana or life per use. In a Full DPS Power Report, this search runs once for the main pass and again for each Full DPS pass. Skills that could never pay the cost still get a full calculation before being thrown out.
This PR:
minimumCostPerUsetrigger setting, replacing Kitava's two custom comparers. Candidates that can't pay the cost stop right after the cost is calculated.Calculation results are unchanged.
Steps taken to verify a working solution:
devon a Foulborn Kitava Crackling Lance build: the main output, node and item comparisons, every Power Report value and the Full DPS unique sort order are identical.Link to a build that showcases this PR:
https://pob.codes/b/24AmziqciCB