mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
- Replace `Promise.all` with `pMap` in `js/nostr/commentEvents.js` to limit concurrent relay requests to `RELAY_BACKGROUND_CONCURRENCY` (3). - Update `content/docs/guides/upload-content.md` to use port 3000 for CORS, matching `npm start` default. - Update agent artifacts (`CONTEXT.md`, `TODO.md`, `DECISIONS.md`, `TEST_LOG.md`, `INITIAL_BASELINE.md`). Co-authored-by: PR0M3TH3AN <[email protected]>
1.3 KiB
1.3 KiB
Daily Performance Report - 2026-02-14
Summary
Fixed critical P0 performance issue (unbounded concurrency) in comment subsystem and aligned developer documentation with runtime defaults.
Findings & Fixes
P0: Unbounded Relay Concurrency
- File:
js/nostr/commentEvents.js - Issue:
publishCommentandlistVideoCommentsusedPromise.all(relayList.map(...))to broadcast/fetch from all relays simultaneously. For users with large relay lists (20+), this caused network saturation and UI freezes. - Fix: Refactored to use
pMapwithRELAY_BACKGROUND_CONCURRENCY(default: 3). This limits the number of active requests at any given time. - Verification:
tests/nostr/comment-events.test.mjspassed.
Docs: Outdated CORS Port
- File:
content/docs/guides/upload-content.md - Issue: The guide recommended
AllowedOriginswith port5500, but the project default vianpm startis3000. - Fix: Updated documentation to use
http://localhost:3000.
Artifacts Updated
INITIAL_BASELINE.mdcreated.CONTEXT.md,TODO.md,DECISIONS.md,TEST_LOG.mdupdated.
Next Steps
- Investigate
js/utils/torrentHash.jsusage inUploadModalto ensure large file hashing doesn't block the main thread (potential P1). - Audit
js/nostr/relayBatchFetcher.jsfor similar optimizations (currently uses chunk size 8).