-
-
Notifications
You must be signed in to change notification settings - Fork 658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf: refactor imbuement decay to per-item management #3134
base: main
Are you sure you want to change the base?
Conversation
Refactored the imbuement decay system to manage individual items directly instead of iterating through all players. This improves performance by: Tracking only items with active imbuements. Scheduling events dynamically based on items needing updates. Reducing redundant checks and player-wide loops. Simplifying imbuement decay logic while preserving existing functionality, including protection zone, fight mode, and backpack-specific rules. This change optimizes the handling of imbuements and ensures better scalability.
14deabf
to
c001339
Compare
Quality Gate passedIssues Measures |
Function |
I didn't understand your comment. Have you tested it? This check has already been done. |
Quality Gate passedIssues Measures |
Description
This refactors the imbuement decay system, changing it from a player-wide loop to a per-item approach. This significantly optimizes performance by reducing redundant checks and focusing only on items that require decay updates. The refactor includes:
Resolves #3135
Behaviour
Actual
The previous implementation iterated through all players and their inventory items to process imbuement decay. This led to unnecessary overhead, even for players with no relevant items.
Expected
The new implementation tracks only items with active imbuements, dynamically managing their decay schedule and conditions. This minimizes unnecessary processing and ensures accurate decay handling.
Type of change
How Has This Been Tested
The changes were tested with the following scenarios:
Checklist