diff options
| author | Adam Soltys <[email protected]> | 2026-10-11 19:51:45 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-10-11 19:51:45 -0700 |
| commit | fdaf7137139540d2f8de50b2a42d6ff3c036328b (patch) | |
| tree | 28577cec63e2ced3b2cdde83288e1b234bc2dde3 /tools/sync-split-test.js | |
| parent | 491904e04fe3d69aa6b417c266aa8b550ffa0534 (diff) | |
| download | coinosv3-fdaf7137139540d2f8de50b2a42d6ff3c036328b.tar.gz coinosv3-fdaf7137139540d2f8de50b2a42d6ff3c036328b.zip | |
Feed: a wheel scroll through a loading feed no longer stutters on a laptop. The phone was fine (its scroll is the compositor's) but the desktop's wheel coast is driven from the main thread, so every long task froze it, and a feed that was still loading ran dozens of them: each ready post went in through its own admitFeed → holdScroll → full render (200–450 ms apiece; a Popular switch did 49 in a few seconds, one of them 1.3 s). Inside those renders the window's list getter — run on every scroll frame too — filtered every note through the mute/spam/report checks, and each check re-derived the login identity (two parses of the stored state plus a bech32 encode): 11 s of a 2-minute profile. Now ready posts are admitted together, one render per 120 ms, and while the reader is moving the page the batch waits for a quiet moment (up to 1.5 s); nostrLoginIdentity keeps its answer for 250 ms (dropped by its own saves, a signer change or another wallet's key), npubOf is memoized, modOn reads the cached messages state, the foreign-language guess is remembered per post, and the window list is reused between renders. Measured on Adam's dev tab (tools/feed-scroll-jank.js: real CDP wheel notches, chip clicks mid-load, rAF frame gaps, long tasks, a CPU profile that names each busy stretch): stalled time during a switch 1.9–2.5 s → 0–83 ms, no frame over 50 ms on the wheel path, main thread busy 33% → 17%; settled scrolling was already clean. feed-streaming's "tap reveals the oldest ready new post" fails on the previous commit too.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Diffstat (limited to 'tools/sync-split-test.js')
0 files changed, 0 insertions, 0 deletions
