Optimize WLED processing pipeline and add FPS metrics
- Add numpy-based DDP pixel packing (send_pixels_numpy) and fast send path (send_pixels_fast) eliminating per-pixel Python loops - Move ProcessedLiveStream filter processing to background thread so get_latest_frame() returns pre-computed cached result instantly - Vectorize map_border_to_leds for average interpolation using cumulative sums instead of 934 individual np.mean calls (~16ms -> <1ms) - Batch all CPU work into single asyncio.to_thread call per frame - Fix FPS calculation to measure frame-to-frame interval (was measuring processing time only, reporting inflated values) - Add Potential FPS metric showing theoretical max without throttling - Add FPS label to WLED target card properties - Add fps_potential field to TargetProcessingState API schema Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -130,6 +130,7 @@
|
||||
"device.stopped": "Processing stopped",
|
||||
"device.metrics.actual_fps": "Actual FPS",
|
||||
"device.metrics.target_fps": "Target FPS",
|
||||
"device.metrics.potential_fps": "Potential FPS",
|
||||
"device.metrics.frames": "Frames",
|
||||
"device.metrics.errors": "Errors",
|
||||
"device.health.online": "WLED Online",
|
||||
|
||||
Reference in New Issue
Block a user