Repository navigation
fix(server): scrolling back through a long thread no longer re-reads the whole thread on every page - #11
fix(server): scrolling back through a long thread no longer re-reads the whole thread on every page#11bompus wants to merge 2 commits into
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
|
Handled, no push needed (head stays 2328eba, so this review is current).
|
|
cubic waiver for this pull request: on 2026-10-16 the owner selected the option "Waive cubic for fork PR #11" (reply "9c, 9b"), because cubic is over its account limit ("AI review line limit reached", expected until about 2026-11-11). CodeRabbit finished on the final head 2328eba with no actionable comments. |
…the whole thread index on every page Each history or timeline page read every turn item of the thread and rebuilt the visible-item index in JS, so a full scrollback cost time quadratic in thread length (13,000 items: 72 pages, 2.3 to 2.7 s). The index is now kept for the 4 most recently read threads and reused while the newest event of the thread and its fork sources is unchanged, using the same revision check thread find already relies on.
2328eba to
0f04d16
Compare
|
@coderabbitai full review |
|
Fork review only, never merged: this is the diff intended for pingdotgg/t3code (see pingdotgg#20427).
Scrolling back through a long thread rebuilt the whole thread index on every history page. This keeps the index for the 4 most recently read threads and reuses it while the newest event of the thread and of its fork sources is unchanged.
The revision query moved from
ThreadFind.tstothreadRevision.ts. Focused tests: ThreadFind, ProjectionStore, threadHistoryPaging and ThreadSearch, 90 passed.Summary by cubic
Scrolling back through a long thread no longer rebuilds the whole thread index on every history page, cutting scrollback time from quadratic in thread length (13k items: 72 pages, 2.3–2.7s) to a few cached reads.
ThreadFind.tsto the newthreadRevision.tsso both callers use the same check.Written for commit 5dcc490. Summary will update on new commits.