
CloakNotes — Private AI Workspace
On-device audio workspace running quantized INT4 LLMs with <1.1GB RAM active footprint and zero cloud latency.
Telemetry-to-Glass Latency
2.1 ms
GC Pauses per Minute
0
Zero-Allocation
Max Sustainable Frame Rate
120 FPS
Locked
Works on
01 / The Problem & Hard Constraints
Sim-racing telemetry engines broadcast high-frequency data (RPM, tire temps, suspension travel) over UDP at 60Hz to 120Hz. Rendering this data on a mobile or edge display introduces severe UI thread contention.
02 / Architecture & Core Design Decisions
03 / Deep Technical Challenges & Solutions
The Challenge: Thread Synchronization Latency. Passing 120 state updates per second between the UDP worker thread and the UI thread via standard message passing caused queue bloat and a 3-frame delay (desyncing the RPM audio from the visual tachometer).
The Solution: Shared Memory & Atomic Locks. I implemented a SharedArrayBuffer (or Dart FFI shared pointer). The UDP thread writes telemetry directly to this shared memory region using atomic operations. The UI thread simply reads the memory pointer at the start of every display refresh cycle (v-sync). This bypassed the message-passing queue entirely, reducing telemetry-to-glass latency to <1ms.
Benchmarks
| Metric | Standard State-Driven UI (React/Standard Flutter) | Veloq (Shared Memory + Canvas) |
|---|---|---|
| Telemetry-to-Glass Latency | 35 - 50 ms | 2.1 ms |
| GC Pauses per Minute | > 45 (Noticeable Stutter) | 0 (Zero-Allocation) |
| Max Sustainable Frame Rate | 45 FPS (Thermal Throttling) | 120 FPS (Locked) |
| Memory Footprint | 180 MB | 22 MB |