From 2803f76aacb08ac54240a24b328cddb181ef0730 Mon Sep 17 00:00:00 2001 From: 3dtours Date: Sat, 10 Oct 2026 20:25:53 +0700 Subject: [PATCH] perf(library): a drive is walked with its position written every five seconds --- docker/frontend/src/engine/library.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docker/frontend/src/engine/library.ts b/docker/frontend/src/engine/library.ts index 468f435..ea4686a 100644 --- a/docker/frontend/src/engine/library.ts +++ b/docker/frontend/src/engine/library.ts @@ -55,8 +55,16 @@ const FLUSH_MS = 400; const LANES = 4; // How often the walk's position is written down, in the same seconds as the // catalogue is read back on: the position is the whole of what the walk has found -// and not read, and writing it is a string of a few megabytes on a long roll. -const WALK_MS = 1000; +// and not read, and writing it is a string of a few megabytes on a long roll — +// on the hundred-and-forty-thousand-frame roll of a whole drive it is that many +// paths joined, stringified and encoded, some twelve to eighteen megabytes of +// rubbish the page drops every time, which at a second apiece is what drives a +// reading of a drive to the better part of two gigabytes and shuts the tab. Five +// seconds is a fifth of that rubbish and a position the reading catches up to on +// its own: a frame it has already listed is one it does not read again. +// ponytail: ceiling is the write itself, still megabytes; cut `HEAD_BYTES` or +// write the position as a delta if five seconds is not enough. +const WALK_MS = 5000; // How often the screen is told how far the reading has come: the column is // rebuilt out of the count, and a rebuild a frame is a reading that spends its // time drawing itself. Five times a second is a counter that moves to the eye