Walk & Test: add 0.25s and 0.5s round intervals - #9
Merged
Conversation
Both were measured before being offered rather than assumed to work. The browser sustains it. At a 250 ms gap the loop settles at 0.306 s per round, and the number does not move as the walk deepens: 0.306 s over the first fifteen seconds, 0.309 s two minutes and 3,890 samples later. Sort stayed responsive at 159 ms and opening a new spot at 280 ms with that many samples behind them. The concern going in was that the per-round aggregation rescans every sample, so cost would grow with walk length; at these depths it does not, and the measurement says so rather than an optimisation nobody needed. It holds because the loop awaits a whole round before starting the interval timer, so the setting is a gap between rounds rather than a fixed cadence. Requests cannot pile up, and a slow link stretches the gap instead. What it is not is polite. Sustained, a quarter-second gap is up to about 2,000 requests to each of ten third parties over ten minutes, so selecting either sub-second option raises a notice saying so. It also names the failure mode that matters for reading the result: a destination whose bot protection starts refusing appears as a dead card when it is really a rate limit. SUB_SECOND_INTERVAL_MS carries the threshold and the reasoning, and a test pins which choices it flags. The disclosure list and the README privacy table carry the revised request volume, since the previous figures predated anything faster than one second.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
0.25sand0.5sto the round-interval dropdown. Both were measured before being offered rather than assumed to work.The browser sustains it
At a 250 ms gap the loop settles at 0.306 s per round, and the number does not move as the walk deepens:
389 rounds, 3,890 samples. Sort stayed responsive at 159 ms and opening a new spot at 280 ms with that many samples behind them. The saved record came to 95 KB after truncation.
The concern going in was that per-round aggregation rescans every sample, so cost would grow with walk length. At these depths it does not, and the measurement says so rather than an optimisation nobody needed.
It holds because the loop awaits a whole round before starting the interval timer, so the setting is a gap between rounds rather than a fixed cadence. Requests cannot pile up, and a slow link stretches the gap instead.
What it is not is polite
Sustained, a quarter-second gap is up to about 2,000 requests to each of ten third parties over ten minutes. Selecting either sub-second option now raises a notice saying so, which also names the failure mode that matters for reading the result: a destination whose bot protection starts refusing appears as a dead card when it is really a rate limit.
SUB_SECOND_INTERVAL_MScarries the threshold and the reasoning, and a test pins exactly which choices it flags — safe for the browser and polite to other people's servers are separate questions, and the notice is about the second one.Also
The disclosure list and the README privacy table carry the revised request volume; the previous figures predated anything faster than one second.
Verification
npm run checkgreen: 314 tests, 1 new.Generated by Claude Code