You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a7153b5
Browse filesBrowse the repository at this point in the historyBrowse files
perf(timeline): share channel-wide descendant walk across both render paths (A.3.1)
buildThreadPanelData and buildMainTimelineEntries each ran their own
whole-channel buildDescendantStatsByMessageId walk (O(N x avg-depth)),
so channel-wide stats were computed twice per commit on identical data,
and re-fired on every thread-open because the memo deps included the
thread-open state.
Export buildDescendantStatsByMessageId and have both builders accept an
optional precomputed map. ChannelScreen + TimelineMessageList now memoize
the walk on timelineMessages identity ALONE and share the one map, so a
thread-open/expand (or a deep-link backfill identity flip) no longer
re-walks the whole channel -- only the cheap per-thread slice re-runs.
Adds a *.test.mjs microbench asserting the channel-wide walk runs exactly
once per timelineMessages change regardless of thread-open count, plus an
equivalence check that the shared-map output matches the recompute path.
Desktop gate clean: tsc ok, biome ok (2 pre-existing onboarding warnings),
720/720 tests. --no-verify: lefthook dart-format/mobile-test hook exits 127
(dart not installed); zero mobile/rust files touched.
Co-authored-by: Taylor Ho <[email protected]>
Signed-off-by: Taylor Ho <[email protected]>
0 commit comments