mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
- `handleVisibility` only scheduled intervals but didn't trigger an immediate refresh when returning to the tab. - This caused `tests/unit/services/exploreDataService.test.mjs` to fail (assertion `0 !== 1`). - Added explicit calls to `refreshWatchHistoryTagCounts` and `refreshTagIdf` when `document.hidden` becomes false. 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.