mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
- Replaced unbounded `Promise.all` with `pMap` and `RELAY_BACKGROUND_CONCURRENCY || 3` in `js/nostr/dmSignalEvents.js` and `js/services/dmNostrService.js` to prevent network saturation. - Updated `scripts/check-hex.js` to exclude agent artifact directories (`perf/`, `test_logs/`, `context/`, etc.) to prevent lint failures when agents log code snippets or hex codes. - Increased `maxBuffer` in `scripts/check-hex.js` to 10MB to be robust against large matches. - Updated `js/services/exploreDataService.js` to trigger immediate data refresh (`refreshWatchHistoryTagCounts` and `refreshTagIdf`) when visibility state changes to visible, fixing a unit test failure. - Includes daily performance report and context logs. Co-authored-by: PR0M3TH3AN <[email protected]>
2.2 KiB
2.2 KiB
Daily Performance Report - 2026-02-17
Summary: Bounded concurrency for DM signal events and DM service initialization to prevent network saturation. Fixed CI failure in lint:hex and unit-tests.
Findings & Fixes
P0: Unbounded Concurrency in DM Subsystem
- Files:
js/nostr/dmSignalEvents.js,js/services/dmNostrService.js - Impact:
Promise.allwas used to map over all relays (potential for 20+ connections simultaneously) for DM read receipts, typing indicators, and service connections. - Fix: Replaced with
pMapusingRELAY_BACKGROUND_CONCURRENCY || 3. - Verification:
npm run test:dm:unitandnpm run test:dm:integrationpassed.
CI Failure (lint:hex)
- Problem: The
npm run lint:hexscript failed in CI becausegit grepscannedperf/hits-2026-02-17.txt(which contained a dump ofwebtorrent.min.jsfrom an agent search) and found hex codes, treating it as a violation. - Fix: Updated
scripts/check-hex.jsto exclude agent artifact directories (perf/,test_logs/,context/,decisions/,todo/). - Additional Fix: Increased
maxBufferinscripts/check-hex.jsto 10MB to be robust against large matches.
CI Failure (unit-tests)
- Problem:
tests/unit/services/exploreDataService.test.mjsfailed with0 !== 1for "visibility change triggers refresh". The test expected an immediate data refresh whendocument.hiddenchanged tofalse, but the implementation only started the interval timer. - Fix: Updated
handleVisibilityinjs/services/exploreDataService.jsto triggerrefreshWatchHistoryTagCountsandrefreshTagIdfimmediately when becoming visible.
Docs Audit
- Port Alignment: Verified
content/docs/guides/upload-content.mdcorrectly specifies port 3000 for CORS, aligning with previous remediation. No changes needed.
Metrics
- Login Time: N/A (change affects background network tasks).
- DM Decrypt Queue: N/A (network bounding).
Decisions
- Used
RELAY_BACKGROUND_CONCURRENCY || 3for DM operations to match relay manager behavior and ensure robustness against missing constants.
PRs / Commits
perf: bound DM subsystem network concurrency & fix CI lint/tests