Compare commits

...

2 Commits

Author SHA1 Message Date
xRangerDE
62400e4aa0 release: 4.6.73 remove 3 high-volume console.log calls
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 05:09:29 +02:00
xRangerDE
7e7be1d103 perf: remove 3 high-volume console.log calls in download / update paths
Three console.log calls in main.ts were flooding stdout during normal
operation:

1) `console.log("Starting download:", cmd, args)` — redundant with
   the appendDebugLog("download-part-start", ...) one line below.
   Duplicate logging; pure noise.

2) `console.log("Streamlink:", line)` — fired for every line of
   streamlink stdout, which is 10-100 lines/sec during an active
   download. Hundreds of thousands of lines per multi-hour recording.
   Progress + state parsing already happens on the same line; the
   raw output was never consumed.

3) `console.log("Download progress: X%")` in the autoUpdater
   handler — fires ~10x/sec during an in-flight update download.
   The renderer banner is the user-visible feedback; this was
   developer-only and never necessary in prod.

Removed all three. The remaining four console.log calls (login
flow, update-available, update-downloaded, no-updates-available)
are once-per-event and fine to keep.

Practical benefit: stdout becomes useful for actual diagnostics
again. Performance gain is marginal in absolute terms but the
buffered noise on a long-running session was real.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 05:09:29 +02:00
3 changed files with 13 additions and 6 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "twitch-vod-manager",
"version": "4.6.72",
"version": "4.6.73",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "twitch-vod-manager",
"version": "4.6.72",
"version": "4.6.73",
"license": "MIT",
"dependencies": {
"axios": "^1.6.0",

View File

@ -1,6 +1,6 @@
{
"name": "twitch-vod-manager",
"version": "4.6.72",
"version": "4.6.73",
"description": "Twitch VOD Manager - Download Twitch VODs easily",
"main": "dist/main.js",
"author": "xRangerDE",

View File

@ -3293,7 +3293,8 @@ function downloadVODPart(
args.push('--hls-duration', endTime);
}
console.log('Starting download:', streamlinkCmd.command, args);
// download-part-start in the debug log captures the same info
// for support / forensics — no need to flood stdout too.
appendDebugLog('download-part-start', { itemId, command: streamlinkCmd.command, filename, args });
const proc = spawn(streamlinkCmd.command, args, { windowsHide: true });
@ -3360,7 +3361,11 @@ function downloadVODPart(
proc.stdout?.on('data', (data: Buffer) => {
const line = data.toString();
console.log('Streamlink:', line);
// No per-line stdout — streamlink emits 10-100 lines/sec during
// an active download, which floods the terminal in dev and the
// electron-launched console in prod. Progress + tag parsing
// below extracts everything we need; failures get logged via
// appendDebugLog from the consumer side.
// Parse progress
const match = line.match(/(\d+\.\d+)%/);
@ -6440,7 +6445,9 @@ function setupAutoUpdater() {
});
autoUpdater.on('download-progress', (progress) => {
console.log(`Download progress: ${progress.percent.toFixed(1)}%`);
// No per-tick stdout — the autoUpdater fires this ~10x/sec during
// an in-flight download. The renderer banner is the user-visible
// surface; appendDebugLog already captures phase transitions.
if (mainWindow) {
mainWindow.webContents.send('update-download-progress', {
percent: progress.percent,