Files
bitvid/daily-perf-report-2026-02-15.md
google-labs-jules[bot]andPR0M3TH3AN f1c83534d6 perf: bound DM subsystem network concurrency & fix CI lint/tests
- 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]>
2026-02-18 15:08:13 +00:00

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.js was running setInterval loops 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 handleVisibility to pause intervals when document.hidden is 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.md vs js/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 ExploreDataService for any regression in data freshness (though unlikely as it updates on visibility).
  • Continue auditing other setInterval usages in future runs.