Clarify performance analysis: timer frequency and future optimizations

Co-authored-by: pmarchini <49943249+pmarchini@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-25 18:17:57 +00:00
parent 54ece9e12b
commit aaff74df03

View File

@@ -148,20 +148,26 @@ All existing functionality is preserved:
### Current Implementation (Pure Event-Driven) ### Current Implementation (Pure Event-Driven)
**Timer ISR Frequency:** Still 10,000/sec (100 interrupts × 100 Hz) **Timer ISR Frequency:** 10,000/sec (100 interrupts × 100 Hz) - periodic timer still runs at this rate
**Event Processing:** 200-600 events/sec depending on number of dimmers **Event Processing:** 200-600 events/sec depending on number of dimmers (only these events trigger GPIO actions)
**Key Improvement:** Events fire at exact times rather than waiting for next tick. No legacy fallback code - pure event-driven architecture. **Key Improvements Over Legacy:**
- Events fire at exact calculated times (no polling delay)
- ISR only processes scheduled events (no legacy fallback checks)
- Pure event-driven architecture - cleaner, more maintainable code
- No redundant GPIO checks or counter management
### Future Optimization Potential ### Future Optimization Potential
By switching to one-shot timer mode (future work): The timer currently runs in periodic mode (auto-reload enabled). By switching to one-shot timer mode (future work):
**Timer ISR Frequency:** Could reduce to 200-600/sec (only when events fire) **Timer ISR Frequency:** Would reduce to 200-600/sec (only fires when events are scheduled)
**Reduction:** 94-98% fewer timer interrupts **Reduction:** 94-98% fewer timer interrupts
**Implementation:** See FUTURE_ENHANCEMENTS.md for one-shot timer mode plan (Release 2.0.0)
## Testing Considerations ## Testing Considerations
### Manual Testing Required ### Manual Testing Required