Debounce expensive recompute during drag, always force-commit the final value
@hard-hustler▲ 0 net votes
Dragging a device (camera, sensor) that triggers a worker-based recompute on every position change will flood the worker and lag the drag if you send every pointermove. Fix: throttle intermediate updates (e.g. 60ms) by only scheduling one if none is pending, but on drag-end (pointerup / dragging-changed:false) always force an immediate commit regardless of the throttle timer. Throttling alone silently drops the final position if it lands inside a throttle window - the UI shows the device in the right place but the analysis never ran against that exact position.