From 555d666b0f81c06e7eb1ce855f561484c2aa8dd3 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sun, 1 Nov 2026 00:53:45 -0700 Subject: [PATCH 1/2] chore(quest): claim quest/m2/performance-survey/mkv-fragments.md Quest-Claim: 935e227d3b6442f8 From 2334f47387d0a6e6f14c48ba38d665d774eab7e0 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sun, 1 Nov 2026 01:17:04 -0700 Subject: [PATCH 2/2] quest: delete mkv-fragments, the MKV importer no longer replays input moq-dev/moq#6908 replaced the clone-and-replay drain with an incremental decoder, and moq-dev/moq#7234 streams blocks through its own EBML reader. A deterministic sweep (block size x chunk size, instructions and allocation) shows the O(B^2/c) slope at the audit commit and none since. Co-Authored-By: Claude Opus 5.5 --- quest/m2/performance-survey/README.md | 9 ++++-- quest/m2/performance-survey/mkv-fragments.md | 31 -------------------- 2 files changed, 6 insertions(+), 34 deletions(-) delete mode 100644 quest/m2/performance-survey/mkv-fragments.md diff --git a/quest/m2/performance-survey/README.md b/quest/m2/performance-survey/README.md index c25cce3d3b9..60cb700dbe6 100644 --- a/quest/m2/performance-survey/README.md +++ b/quest/m2/performance-survey/README.md @@ -153,8 +153,12 @@ No duplicate quest or workflow edit belongs here. - The 2026-10-22 release audit bounded the media reorder queues in [moq-dev/moq#6453](https://github.com/moq-dev/moq/pull/6453) and fixed QMux copying in - [moq-dev/moq#6381](https://github.com/moq-dev/moq/pull/6381). MKV - fragmentation below concerns parser replay before those queues. + [moq-dev/moq#6381](https://github.com/moq-dev/moq/pull/6381). The MKV + importer's replay of accumulated input before those queues was removed by + [moq-dev/moq#6908](https://github.com/moq-dev/moq/pull/6908) and + [moq-dev/moq#7234](https://github.com/moq-dev/moq/pull/7234); the + measured no-win is in [moq-dev/moq#7515](https://github.com/moq-dev/moq/pull/7515), + and the nightly `mkv-chunks` and `mkv-payloads` series cover the slope. - [Binding bytes](https://github.com/moq-dev/rust2/blob/main/quest/m1/ffi-bytes.md), [foreign polling](https://github.com/moq-dev/rust2/blob/main/quest/m1/ffi-poll-protocol.md), [Kotlin calls](https://github.com/moq-dev/rust2/blob/main/quest/m1/kt-ffi-calls.md), @@ -180,7 +184,6 @@ No duplicate quest or workflow edit belongs here. - [Bandwidth grants](/quest/m2/performance-survey/bandwidth-grants.md) - repeated full allocation in Rust and JS - [Cached JS group joins](/quest/m2/performance-survey/js-cached-groups.md) - repeated sorting while replaying retained groups - [PCM batch processing](/quest/m2/performance-survey/audio-batches.md) - repeated tail movement during encoding and resampling -- [Fragmented MKV import](/quest/m2/performance-survey/mkv-fragments.md) - accumulated-buffer copies and parser replay - [QUIC scheduling churn](/quest/m2/performance-survey/quic-schedule-churn.md) - priority and retirement work across unrelated groups - [HLS request fan-out](/quest/m2/performance-survey/hls-serving.md) - repeated fetch, remux and playlist construction per viewer - [Buffered browser groups](/quest/m2/performance-survey/hang-buffered.md) - per-frame scans and bulk skip work diff --git a/quest/m2/performance-survey/mkv-fragments.md b/quest/m2/performance-survey/mkv-fragments.md deleted file mode 100644 index 56d3f514f39..00000000000 --- a/quest/m2/performance-survey/mkv-fragments.md +++ /dev/null @@ -1,31 +0,0 @@ -# [M] Fragmented MKV import avoids replaying accumulated input - -## Goal - -Streaming MKV/WebM import costs remain reasonable as the same input is -split into smaller reads, without changing accepted media or parse errors. - -## Plan - -[Import::drain](/rs/moq-mux/src/container/mkv/import.rs) clones the retained -BytesMut, constructs a fresh WebmIterator and skips handled tags only after -parsing them (lines 227-252). A B-byte partial block arriving in c-byte -chunks can copy O(B²/c) bytes before completion; replay can add parse work. -This is before the reorder queues, which -[moq-dev/moq#6453](https://github.com/moq-dev/moq/pull/6453) bounded. - -Benchmark block size × input chunk size with identical complete media, -including large keyframes, lacing, bounded BlockGroups and unknown-size live -containers. Measure instructions/input byte, allocation and copy volume, -latency to first frame and peak memory. Separate cold catalog startup from -steady parsing. Include fragmented malformed/truncated tags in correctness -checks and ensure bytes, timestamps and errors match unsplit input. - -Prefer retained parser progress or bounded incremental staging if it wins. -Do not hide the slope with a minimum read size or an arbitrary refusal cap. -This specializes the recurring audit's generic MKV importer coverage. - -Follow the [survey's benchmark contract](/quest/m2/performance-survey/README.md): -measure the baseline before optimizing, retain paired evidence, verify equivalent -work, schedule coverage nightly, and accept a measured no-win. Expected public -API and wire impact: none; report the actual impact in the implementation PR.