Commit 7f21061
committed
Phase 4 Task 2: DirtyFlagManager Integration for Batched Frame Updates (v1.24.0)
MAJOR: Intelligent frame update batching via PerformanceLib.DirtyFlagManager
Performance Improvements:
• Event coalescing: 69.6% efficiency (1,963 of 2,816 events batched)
• Frame time: 16.66ms avg, P99=28ms (stable at 60 FPS)
• UNIT_HEALTH: 78% reduction (695→124 dispatched)
• UNIT_POWER_UPDATE: 72% reduction (335→94 dispatched)
• UNIT_AURA: 54% reduction (457→211 dispatched)
• Dropped frames: 0 (perfect stability)
• DirtyFlagManager: 229 frames processed in 105 batches
New Features:
• DirtyFlagManager helper functions: GetFrameUpdatePriority, MarkFrameDirty, MarkAllFramesDirty, MarkFramesByUnitTypeDirty
• Interactive TestPanel: /suf test command with 6 test buttons (Phase 1-3c + Stats)
• Event coalescing config expansion: 14 new events (13 UNIT_SPELLCAST_* + UNIT_AURA)
• Priority-based frame batching: player (CRITICAL) → target (HIGH) → party (MEDIUM) → raid (LOW)
• Graceful fallback to synchronous updates when PerformanceLib unavailable
Changes:
• SimpleUnitFrames.lua:
- Lines 4113-4213: New DirtyFlagManager helper functions
- Lines 6910-6943: UpdateAllFrames with batching + fallback
- Lines 7683-7725: UpdateFramesByUnitType with batching + fallback
- Lines 2725-2744: DirtyFlagManager initialization in SetupPerformanceLib
- Lines 730-785: EVENT_COALESCE_CONFIG expanded (14 new events)
- Lines 705-728: PERF_EVENT_PRIORITY with casting event priorities
- Lines 3209-3343: HandleCoalescedUnitEvent with priority routing
• Modules/UI/TestPanel.lua: New interactive test panel (450+ lines)
• Modules/System/Commands.lua: /suf test command integration
• SimpleUnitFrames.toc: Version 1.24.0, added TestPanel.lua
• TODO.md: Phase 4 Task 2 marked COMPLETE with full validation results
• WORK_SUMMARY.md: Testing results and performance metrics documented
Event Configuration:
• Added UNIT_SPELLCAST_START, STOP, CHANNEL_*, EMPOWER_*
• Added UNIT_SPELLCAST_FAILED, INTERRUPTED, DELAYED, UPDATE
• Added UNIT_SPELLCAST_INTERRUPTIBLE, NOT_INTERRUPTIBLE
• Added UNIT_AURA (missing from original config)
• Priority tuning: START events HIGH (priority 2), STOP/UPDATE/FAILED LOW (priority 4)
• Delays: 0.05-0.12s based on event frequency and impact
Testing & Validation: ✅ COMPLETE
• Phase 1: Addon load test PASSED
• Phase 2: Solo play test PASSED
• Phase 3: Profiler baseline PASSED
• Phase 4: Event routing PASSED
• Phase 5: Priority tuning PASSED
• All success criteria met (0 dropped frames, P99=28ms)
Backward Compatibility:
• All DirtyFlagManager calls wrapped in performanceLib check
• Fallback to synchronous updates if PerformanceLib not loaded
• No breaking changes to existing APIs
Documentation:
• docs/PHASE4_SESSION_SUMMARY.md: Session timeline and debugging logs
• docs/PHASE4_TASK2_IMPLEMENTATION_PLAN.md: Design and implementation strategy
• docs/PHASE4_TASK2_IMPLEMENTATION_COMPLETE.md: What was built and how to use
Version: 1.24.0 (Phase 4 Task 2 release)
Fixes:
• Fixed invalid event name PLAYER_LEADER_CHANGED → verified PARTY_LEADER_CHANGED
• Fixed TestPanel slash command registration (RegisterChatCommand instead of RegisterSlashCommands)
• Fixed missing UNIT_AURA in EVENT_COALESCE_CONFIG
• Fixed event routing priority parameter passing (eventName → priority)1 parent d286640 commit 7f21061
10 files changed
Lines changed: 2165 additions & 20 deletions
File tree
- Libraries/oUF/elements
- Modules
- System
- UI
- docs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
585 | 585 | | |
586 | 586 | | |
587 | 587 | | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
588 | 593 | | |
589 | 594 | | |
590 | 595 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
226 | 227 | | |
227 | 228 | | |
228 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
229 | 234 | | |
230 | 235 | | |
231 | 236 | | |
| |||
0 commit comments