th-ch / youtube-music

YouTube Music Desktop App bundled with custom plugins (and built-in ad blocker / downloader)
https://th-ch.github.io/youtube-music/
MIT License
9k stars 512 forks source link

Adblock mode causes memory issues; "In-Player" fixes memory leakage #1187

Closed DereC4 closed 1 year ago

DereC4 commented 1 year ago

The Problem

Recent memory accumulation events have been reported. One solution working for me and a majority of users was to change the Adblock plugin mode to "In-Player" from "with blocklists"

image

My Findings

After running multi-hour tests with the Windows Performance Monitor, RAM usage seems to be stable (fig 1) using "in-player", but sees an accumulation of memory over time (fig 2) using "with blocklists". These findings correspond with the smooth experience while using "in-player" but laggy experience (after a period of time) using "with blocklists".

fig 1.

Performance Monitor 6_30_2023 04_02_24 PM

fig 2.

Performance Monitor 6_30_2023 04_02_28 PM

Related #1158 , #1147 , #1162

th-ch commented 1 year ago

👋 Hey @DereC4, thanks for reporting! Regarding the linked issues, is the memory leak only lead to the ad plugin and the "with blocklists" setting? One idea that comes to mind would be switching the default to "in player" if it can help people

DereC4 commented 1 year ago

Oops sorry for the delay I've been on the other side of the globe, but it seems that the in player default would help fix a lot. Could you explain how the blocklists works and how it may be contributing to a memory leak? I thought it would just load in a predefined list and check it for every song.

👋 Hey @DereC4, thanks for reporting! Regarding the linked issues, is the memory leak only lead to the ad plugin and the "with blocklists" setting? One idea that comes to mind would be switching the default to "in player" if it can help people

mistermatrix24 commented 1 year ago

Disabling adblocker all together has greatly improved performance. I'm curious, I would only need adblocker if I didn't have a paid YT Music subscription right?

DereC4 commented 1 year ago

Disabling adblocker all together has greatly improved performance. I'm curious, I would only need adblocker if I didn't have a paid YT Music subscription right?

Youtube Music Premium allows you "to listen to music ad-free, offline & with your screen off" so that makes sense

paulo-roger commented 1 year ago

Just had a memory leak problem, I am on Linux Manjaro. I am gonna test without the adblocker to see if this fixes the issue.

DereC4 commented 1 year ago

neat