diff options
| author | Adam Soltys <[email protected]> | 2026-09-13 09:36:11 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-09-13 09:36:11 -0700 |
| commit | 810d3d8bfd523a8a2a4a51cd2e426d72af049d13 (patch) | |
| tree | 9b0f6110bbeec8b1de7158d0ef0d7f8d81708eb5 /src/api.js | |
| parent | 848c3edd115360739b5680fec45ef6b71b3b9c1c (diff) | |
| download | coinosv3-810d3d8bfd523a8a2a4a51cd2e426d72af049d13.tar.gz coinosv3-810d3d8bfd523a8a2a4a51cd2e426d72af049d13.zip | |
A profile is already there when you land on it.
Tapping a face opened an empty page that grew a banner, then a bio, then
a column of posts as relays answered — measured as the browser measures
it, a cumulative layout shift of 0.412, where 0.25 is already "poor".
None of those fetches needed to happen on the tap:
The bio and banner were free all along. The batched kind-0 fetch that
names everyone in the feed downloads their WHOLE profile and then throws
away everything but the name, picture, nip05 and lud16. It keeps `about`
and `banner` now, and the page reads them until the full kind 0 lands —
after which `full` is the truth, including when it says there is no bio.
The posts were in memory. The feed you just tapped through holds up to
two hundred notes and an open thread holds its replies; the ones by this
author paint immediately while the relay fetch gets their real page.
And the rest is a head start: an avatar (or the name beside it) begins
its profile's fetches on pointerdown rather than click. That is a hundred
odd milliseconds free, and unlike the prefetch-every-row this replaces —
sixty requests for twenty rows, which is what starved the profile batch —
it only ever asks about the person actually being tapped.
Measured after: layout shift 0.000, bio in the first frame, posts in the
first frame. tools/profile-open-test.js asserts exactly that, and fails
on the old code with 0.412 and a blank page, so it cannot quietly rot.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_019mrt228Upn9nNCwGixzSLx
Diffstat (limited to 'src/api.js')
0 files changed, 0 insertions, 0 deletions
