-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Priority: P3
Category: Performance
Background:
Parsing currently runs on main thread; heavy bursts (thousands of frames) could block UI if extended. A Web Worker can offload CRC + frame assembly.
Goal:
Introduce optional worker-based parser path toggled automatically when buffered bytes exceed threshold.
Acceptance Criteria:
- Worker file implementing parse loop, posting parsed frames + errors back
- Main thread fallback if worker unsupported
- Benchmark: 10k small frames processed with <50% main thread blocking vs baseline
- Tests (integration) simulate worker messages (mock or real) ensuring identical outputs
Tasks:
- Prototype worker (TypeScript) build via Vite
- Define message protocol (input bytes chunk, flush, result)
- Refactor ModbusClient to optionally delegate
- Benchmark script (manual) results documented in issue comments
- Minimal test verifying delegation logic
Definition of Done:
Worker path functional, tests green, documented trade-offs.
Metadata
Metadata
Assignees
Labels
No labels