mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
- Replaced unbounded `Promise.allSettled` in `js/channelProfile.js` with `pMap` using `RELAY_BACKGROUND_CONCURRENCY` (3). - Ensures network stability when users have many relays. - Audited `/content` docs (upload limits/ports) and confirmed accuracy. - Generated `daily-perf-report-2026-02-17.md`. Co-authored-by: PR0M3TH3AN <[email protected]>
1.0 KiB
1.0 KiB
Decisions - 2026-02-17 (perf-agent)
Design Choices
1. Bounding Concurrency in channelProfile.js
- Context: The
loadUserVideosfunction was firing requests to all user relays simultaneously. - Decision: Use
pMapwithRELAY_BACKGROUND_CONCURRENCY(3). - Rationale: This prevents network saturation when a user has many relays (e.g., 20+), which could block other critical requests (like login or feed loading).
- Tradeoff: Fetching from all relays might take slightly longer in wall-clock time if many are slow, but it keeps the browser responsive.
- Implementation: Wraps the
nostrClient.pool.listcall in a try/catch block inside the mapper to return{ status, value/reason }objects, mimickingPromise.allSettled.
2. Docs Audit Scope
- Context: The prompt requires verifying
/contentupload docs. - Decision: Audited
content/docs/guides/upload-content.mdagainst baseline. - Rationale: This is the primary guide for users. Verified port (3000) and limits (2GB).