alexei.dolgolyov
6f5bda6d8f
Optimize processing pipeline and fix multi-target crash
Performance optimizations across 5 phases:
- Saturation filter: float32 → int32 integer math (~2-3x faster)
- Frame interpolation: pre-allocated uint16 scratch buffers
- Color correction: single-pass cv2.LUT instead of 3 channel lookups
- DDP: numpy vectorized color reorder + pre-allocated RGBW buffer
- Calibration boundaries: vectorized with np.arange + np.maximum
- wled_client: vectorized pixel validation and HTTP pixel list
- _fit_to_device: cached linspace arrays (now per-instance)
- Diagnostic lists: bounded deque(maxlen=...) instead of unbounded list
- Health checks: adaptive intervals (10s streaming, 60s idle)
- Profile engine: poll interval 3s → 1s
Bug fixes:
- Fix deque slicing crash killing targets when multiple run in parallel
(deque doesn't support [-1:] or [:5] slice syntax unlike list)
- Fix numpy array boolean ambiguity in send_pixels() validation
- Persist fatal processing loop errors to metrics for API visibility
- Move _fit_to_device cache from class-level to instance-level to
prevent cross-target cache thrashing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 21:28:17 +03:00
..
2026-02-20 15:49:47 +03:00
2026-02-24 17:07:47 +03:00
2026-02-26 18:23:04 +03:00
2026-02-26 13:55:46 +03:00
2026-02-26 18:23:04 +03:00
2026-02-26 18:23:04 +03:00
2026-02-26 18:23:04 +03:00
2026-02-26 15:48:45 +03:00
2026-02-25 01:27:46 +03:00
2026-02-26 18:23:04 +03:00
2026-02-26 18:23:04 +03:00
2026-02-26 00:08:32 +03:00
2026-02-23 02:15:29 +03:00
2026-02-26 21:28:17 +03:00
2026-02-26 20:22:58 +03:00
2026-02-26 16:56:26 +03:00
2026-02-26 21:28:17 +03:00