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]>
902 B
902 B
Test Log
Environment
- Branch: unstable
- Node version: v22.22.0
Manual Verification
Benchmark: Relay Concurrency
- Script:
benchmarks/relay_concurrency_repro.mjs - Before: Unbounded (20 requests)
- After: Bounded (3 requests)
- Result: PASS
Unit Tests
- Command:
npm run test:unit - Result: PASS (13 tests passed in app-batch-fetch-profiles, etc., 12 tests passed in NostrClient)
- Note:
nostr-toolswarning in benchmark is expected in Node env.
Docs Audit
- Page:
content/docs/guides/upload-content.md - Claims Verified:
- File types: Matches HTML accept attribute.
- Size limits: 2GB recommendation matches browser RAM constraints.
- Upload methods: Direct, External, Magnet supported.
- CORS: Automatic configuration verified in
js/services/s3Service.js. - HTTPS: Enforced in
js/services/videoNotePayload.jsand docs.
- Result: No discrepancies found.