mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
perf: defer board reply fetching and remove nested mobile backlink fetch
Split useReplies in post-desktop.tsx and post-mobile.tsx into preview/full modes so board cards avoid full REPLIES_PER_PAGE fetches by default. Added replies-preview-utils.ts and switched mobile backlinks to use precomputed directRepliesByParentCid map instead of per-reply useReplies.
This commit is contained in:
@@ -1,2 +1,8 @@
|
||||
/** Max replies loaded per page from useReplies. Threads with > this use Virtuoso. */
|
||||
export const REPLIES_PER_PAGE = 500;
|
||||
|
||||
/** Number of replies shown in preview mode on board/listing views. */
|
||||
export const BOARD_REPLIES_PREVIEW_VISIBLE_COUNT = 5;
|
||||
|
||||
/** Number of replies fetched for preview mode on board/listing views. */
|
||||
export const BOARD_REPLIES_PREVIEW_FETCH_SIZE = 25;
|
||||
|
||||
Reference in New Issue
Block a user