mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-04 03:42:26 +00:00
perf: bound relay background concurrency to 3
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]>
This commit is contained in:
1 parent
0607367f1a
commit
d3fa684e45
9 files changed
+234
-17
No files matched your search
+28
@@ -0,0 +1,28 @@
|
||||
# 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-tools` warning 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.js` and docs.
|
||||
- Result: No discrepancies found.
|
||||
Reference in new issue
Block a user