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]>
1.6 KiB
1.6 KiB
Daily Performance Report - 2026-02-15
Summary
Executed daily performance audit. Identified and fixed a visibility gating issue in ExploreDataService to reduce background resource consumption. Verified documentation accuracy for uploads.
Findings & Fixes
P1: ExploreDataService Background Intervals
- Issue:
js/services/exploreDataService.jswas runningsetIntervalloops for watch history (1m) and tag IDF (5m) updates even when the tab was hidden. - Impact: Unnecessary CPU and battery usage for background tabs.
- Fix: Implemented
handleVisibilityto pause intervals whendocument.hiddenis true and resume when visible. - Status: Fixed.
P3: Other Background Tasks
js/app/playbackCoordinator.js: Verified that torrent status updates are already visibility-gated.js/ui/ambientBackground.js: Verified that canvas animations are already visibility-gated.
Metrics
- Performance Hits: 198 (raw grep count).
- Analyzed: 3 specific services/controllers.
- Artifacts:
perf/hits-2026-02-15.json.
Documentation Audit
- Scope:
content/docs/guides/upload-content.mdvsjs/ui/components/UploadModal.js. - Result: Documentation accurately reflects the supported file types, size recommendations (2GB limit due to client-side hashing), and upload methods (Direct R2/S3, External URL, Magnet).
- Status: Aligned.
Next Steps
- Monitor
ExploreDataServicefor any regression in data freshness (though unlikely as it updates on visibility). - Continue auditing other
setIntervalusages in future runs.