forge
Explore
Log in

Don't you dare go Hollow

The seat remembers a window that would not open, the memo does not

Browse files at this commit

7cb30bf3c8f789c839dad16c2b013c15ecab4fa2Ahmet Kaan GümüşParent: b05e9ee
  • docs
    • the seat remembers a window that would not open, the memo does not
Show full message
📝 docs(engine): the seat remembers a window that would not open, the memo does not

The comment claimed the opposite of what the code does: a window that fails to
decode is latched in the seat's own handle -- as an empty slice, for as long as
it paints in that window -- precisely so a file that is not there is not asked
thirty times a second. The memo still keeps successes only, so the next window
and the next seek ask again. Comment only; no behaviour changed.
crates/engine/src/waveform.rsmodified+7 -4
@@ -392,10 +392,13 @@ impl VizWindows {
392392 return crate::decode::VizView::window(&[], first, total, self.summary.peak);
393393 }
394394 if self.current.as_ref().map(|(at, _)| *at) != Some(first) {
395- // A window that will not open keeps the frame's own silence and is
396- // *not* remembered as the window: the next frame asks again, and a
397- // source that comes back (a share remounting, a file finishing its
398- // write) paints again.
395+ // A window that will not open keeps the frame's own silence for the
396+ // rest of it: the seat is what remembers that, and only while it is
397+ // painting in this window -- the memo keeps successes only, so the
398+ // next seek (and the next window) asks the file again, and a source
399+ // that comes back (a share remounting, a file finishing its write)
400+ // paints again. Re-asking every frame instead would hammer a file
401+ // that is not there thirty times a second.
399402 let window = viz_window(
400403 &self.key,
401404 self.summary.sample_rate,