Skip to content

Conversation

@LocalIdentity
Copy link
Contributor

@LocalIdentity LocalIdentity commented Oct 17, 2025

MatchKeywordFlags is currently called on every Sum, More, Flag, Override, List and Tabulate call so ends up being called hundreds of thousands of times when running the gem DPS sort and also a lot when running the tree node sort

At the start of each initEnv we have a fresh cache and store each unique Keyword flag match so it can quickly be used in a lookup instead of computed over and over again saving a ton of band calls

Link to a build that showcases this PR:

https://maxroll.gg/poe2/pob/xl17ge0c

Before screenshot:

image image

After screenshot:

image image

Used with #1504
image

Compared to dev
~250ms improvement on Fresh load
~130ms improvement after JIT cache is warm

Compared to #1504
~190ms further improvement on Fresh load
~100ms further improvement after JIT cache is warm

This function gets called on every Sum, More, Flag, Override, List and Tabulate call so ends up being called hundreds of thousands of times when running the gem DPS sort and also a lot when running the tree node sort
At the start of each initEnv we have a fresh cache and store each unique Keyword flag match so it can quickly be used in a lookup instead of computed over and over again saving a ton of band calls
@LocalIdentity LocalIdentity added enhancement New feature, calculation, or mod pob1 Should also be merged into PoB1 Repo labels Oct 17, 2025
@LocalIdentity LocalIdentity merged commit 9ace39a into dev Oct 25, 2025
3 checks passed
@LocalIdentity LocalIdentity deleted the fix_keywordflag-cache branch October 25, 2025 22:11
github-actions bot pushed a commit to PathOfBuildingCommunity/PathOfBuilding that referenced this pull request Oct 26, 2025
LocalIdentity added a commit to PathOfBuildingCommunity/PathOfBuilding that referenced this pull request Oct 30, 2025
* Apply changes from PathOfBuildingCommunity/PathOfBuilding-PoE2#1507

* Fix merge issue

---------

Co-authored-by: LocalIdentity <LocalIdentity@users.noreply.github.com>
Co-authored-by: LocalIdentity <localidentity2@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature, calculation, or mod pob1 Should also be merged into PoB1 Repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants