mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Replaces unbounded `Promise.all(relays.map(...))` calls with `pMap` using a concurrency limit of 3 for background operations like history hydration, metadata fetching, and DM sending. This prevents network saturation and potential main-thread jank when many relays are configured. Includes benchmark verification script `benchmarks/relay_concurrency_repro.mjs`. Audited upload docs and confirmed accuracy. Co-authored-by: PR0M3TH3AN <[email protected]>
1.0 KiB
1.0 KiB
Daily Performance Report - 2026-02-08
Summary: Bounded background relay concurrency to 3 to prevent network saturation and UI freezes. Verified upload documentation accuracy.
Findings
P1: Unbounded Relay Concurrency
- Location:
js/nostr/client.js(fetchAndCacheNip71Metadata,hydrateVideoHistory,_sendNip17DirectMessage). - Impact: Simultaneously opening connections to all relays (could be 20+) caused network congestion and potential UI jank.
- Fix: Implemented
pMapwithRELAY_BACKGROUND_CONCURRENCY = 3. - Status: Fixed.
Metrics
- Max Concurrent Relay Requests: Reduced from N (number of relays) to 3.
- Login Time: (Not measured directly today, but expected improvement due to reduced initial load).
Docs Audit
- Page:
content/docs/guides/upload-content.md - Result: Verified accurate. Matches code behavior for file types, size recommendations, and HTTPS enforcement.
Artifacts
- [PR #1] perf: bound relay background concurrency
benchmarks/relay_concurrency_repro.mjscreated.