Skip to content

Improve modifier tag documentation and readability - #2592

Open
PJacek wants to merge 2 commits into
PathOfBuildingCommunity:devfrom
PJacek:performance-refactoring
Open

PJacek wants to merge 2 commits into
PathOfBuildingCommunity:devfrom
PJacek:performance-refactoring

Conversation

@PJacek

@PJacek PJacek commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Description of the problem being solved:

This was originally meant to improve performance after I noticed that LuaJIT traces sometimes fail in the big if ... else block in modifier tag evaluation. I observed as much as 1.5-2x speedups with some builds.
However, LuaJIT tracing is inconsistent and nondeterministic. With the same commit and build, I now see no measurable change in performance.
Despite this I believe this change is still beneficial because it improves readability and documentation. I aimed to preserve the existing behavior where possible, while tightening constraints and making them more explicit.

Steps taken to verify a working solution:

  • Added and ran targeted modifier tag tests
  • Ran the full test suite
  • Compared output before and after for ~100 random builds
    Strictly speaking, some actor variables change from false to nil but this does not result in any logic change.

I understand that despite finding no bugs in testing this situation is a bit peculiar because the very core of the calculations is being modified. On one hand the code is executed a lot, so any error should surface quickly, on the other hand the potential surface area is enormous.

@PJacek PJacek added pob1 Should also be merged into PoB1 Repo technical Hidden from release notes labels Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pob1 Should also be merged into PoB1 Repo technical Hidden from release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant