FEC object batching: amortize the ~24µs RaptorQ per-object setup across N packets #27
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
femboy/yip#27
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Design:
docs/superpowers/specs/2026-07-03-fec-object-batching-design.md.RaptorQ
Encoder::newpays its full intermediate-symbol solve (~24 µs/packet, ~80% of egress CPU) wheneverrepair > 0, because yip makes one object per packet. Batching N sealed packets into one object amortizes it to ~24 µs / N.Key design points (see spec): container =
[u16 len][sealed]…; per-packet AEAD counter derived (base+i) so no wire-format change; the accumulator buffers plaintext and seals the batch consecutively at flush so counters stay contiguous (theLossDetectorfills counter gaps, so a separate counter space isn't viable); accumulator lives inDataPlane, flushed via a newDispatch::flush_egressaftertick. Bulk-only (Realtime/Default stay batch=1). Defaults N=8, 1 ms flush.Honest scope: clean links already bypass the encoder (
repair == 0), so this helps only the Bulk-under-loss egress path, not clean-link throughput. Gate:arq_recovers_bulk_loss≥ 98% under batching. Blocked-by review sign-off on the spec's open questions (N, flush deadline, all-or-nothing recovery risk).Obsolete after the FEC codec swap in #50: RaptorQ was replaced by a small-K systematic Reed–Solomon codec (encode ~26 µs → ~1.33 µs). The ~24 µs RaptorQ per-object setup this issue targets no longer exists, so the motivation is gone. Closing.