Skip to content

How long is left, now that the numbers to say it exist - #286

Merged
dhobi merged 1 commit into
masterfrom
dust-loader-eta
Aug 23, 2026
Merged

How long is left, now that the numbers to say it exist#286
dhobi merged 1 commit into
masterfrom
dust-loader-eta

Conversation

@dhobi

@dhobi dhobi commented Aug 23, 2026

Copy link
Copy Markdown
Owner

A rate answers is anything happening. On a connection where a cold boot takes five minutes, the question underneath it is how long — and the loader could not answer that until it knew both halves. It does now: the manifest's byte sizes say what each name weighs, and the store tracks how much of each in-flight fetch has landed.

800 KB/s · 6.0 MB of 95.5 MB · ~3 min left

How the remainder is worked out

DustFiles.bytesLeft(names) — sizes minus what has actually arrived, skipping what is already in hand and counting only the unfetched part of what is in flight. Not a file count scaled by an average. A name the manifest does not size contributes nothing, which makes the estimate optimistic rather than invented; on this disc it sizes everything.

It appears only once the BOOTFILE has been read and there is a prefetch list to weigh — an estimate made before the disc has been asked what a launch needs is a guess wearing a number. The total shown is what has come down plus what is still owed, so it grows if the boot asks for something the plan did not name. That is the honest direction for a total to move.

Why it is rounded so coarsely

Five seconds under a minute and a half, whole minutes above. The rate it divides is a three-second average, so the raw figure jitters by a second or two between ticks, and a countdown that flickers reads as broken even when every value it shows is true. The tilde is doing real work: it is an estimate from the last three seconds of a connection that is free to change its mind.

It says nothing at all when the answer is "any moment now" (under 3 s) or when it exceeds three hours — that is not an estimate, it is a symptom.

Measured

At an 800 KB/s cap: ~3 min left with 89 MB to go, counting down to ~85 s left at 70 MB remaining — which is the arithmetic (70 MB ÷ 800 KB/s ≈ 90 s). A full boot at 4 MB/s reaches 100% with no page errors and drops the estimate on the way out rather than showing "~0 s".

tsc --noEmit clean · npm test 534/534.

🤖 Generated with Claude Code

A rate answers "is anything happening"; on a connection where a cold boot takes
five minutes the question underneath it is "how long", and the loader could not
answer that until it knew both halves. It does now: the manifest's byte sizes
say what each name weighs, and the store tracks how much of each in-flight fetch
has landed, so `bytesLeft` is the honest remainder — sizes minus what has
actually arrived, not a file count scaled by an average.

The caption becomes "800 KB/s · 6.0 MB of 95.5 MB · ~3 min left" once the
BOOTFILE has been read and there is a prefetch list to weigh. Not before: an
estimate made before the disc has been asked what a launch needs is a guess
wearing a number. The total is what has come down plus what is still owed, so it
grows if the boot asks for something the plan did not name, which is the honest
direction for a total to move.

The estimate is rounded coarsely — five seconds under a minute and a half, whole
minutes above — because the rate it divides is a three-second average and the
raw figure jitters between ticks; a countdown that flickers reads as broken even
when every value it shows is true. It says nothing at all when the answer is
"any moment now" (under three seconds) or when it exceeds three hours, which is
not an estimate but a symptom.

Checked against a throttled connection: at an 800 KB/s cap the line reads
"~3 min left" with 89 MB to go and counts down to "~85 s left" at 70 MB, which
is the arithmetic. A full boot at 4 MB/s still reaches 100% with no page errors,
and drops the estimate on the way out rather than showing "~0 s".

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@dhobi
dhobi merged commit f272712 into master Aug 23, 2026
2 checks passed
@dhobi
dhobi deleted the dust-loader-eta branch August 23, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant