aboutsummaryrefslogtreecommitdiffstats
path: root/tools/profile-replies-test.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-11-02 09:26:55 -0700
committerAdam Soltys <[email protected]>2026-11-02 09:26:55 -0700
commit42a76a883d23221cd73e10d8649d8ca28f6aed39 (patch)
treef0d60ed755dc45e51312a3c5f8e8e0207618a284 /tools/profile-replies-test.js
parent84460457619857ea6cb678bb0a7b2918c222014a (diff)
downloadcoinosv3-42a76a883d23221cd73e10d8649d8ca28f6aed39.tar.gz
coinosv3-42a76a883d23221cd73e10d8649d8ca28f6aed39.zip
The feed asks the relays for less, and asks it in fewer REQs. Measured from the laptop (2026-11-02, after the resume fix), an open of Following sent some 560 REQs in twenty seconds across 57 relays, over a hundred each to damus and primal, and damus answered the home IP "banned: too many rate-limit violations". Four sources, all cut: a quoted note's author (a face tapped, a reply's target) had their relay list asked for one REQ per author per relay — six quotes on screen sent eighteen — and those asks now wait 80 ms and go out as one REQ through the feed's batched fetch, which also remembers who has no list; the live subscriptions were closed and reopened at the end of every refresh pass (seventeen REQs over eight relays, twice per open) and now stay up while the relays and authors they cover are unchanged, the head they count fresh posts against read at each event; the follows' reports were fetched afresh at every reload (an in-memory clock) and now honour the clock the device saved, asking only for what came since; and every one-shot REQ was held open on our own relay until the slowest relay in the ask had answered — the library closes them all together — so the fast one carried each for up to five seconds. One-shot queries now go out per relay (queryOn, queryStreamOn, queryManyOn, the profile and inbox lookups), each closed on that relay's own EOSE, with no more than ten open on any relay at once: the rest wait their turn, and a turn that comes after the ask's own wait is skipped. tools/relay-budget-test.js runs the feed against a fast and a slow fake relay and checks each of these
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01VMan6TFgisGKUDhdStLUvs
Diffstat (limited to 'tools/profile-replies-test.js')
0 files changed, 0 insertions, 0 deletions