AdguardTeam / BlockYouTubeAdsShortcut

This repo contains the code for blocking YouTube ads that is supposed to be run by an iOS shortcut
GNU General Public License v3.0
109 stars 7 forks source link

Main javascript drains battery/creates memory leaks #17

Open ghost opened 1 year ago

ghost commented 1 year ago

Hi,

I am observing a few different issues on different Macs and an iPad with this script/shortcut:

On iPad Pro with iPadOS 16.2 RC (and before) the battery drains very fast when using the script in youtube --> 12Min video 5-10% battery drain. Sometimes it is more, sometimes it is less. It does not matter if I integrate the .js with apps like Hyperweb or userscripts or use the shortcuts. Sometimes it is better, sometimes it is worse.

On 3 different Macs M1 (16GB RAM), M1 Pro(16GB RAM), M2(8GB RAM) running Ventura (13.0.1 and current betas tested) I am facing the issue, that after a few mins, the youtube tasks fills up my memory with sometimes ~1GB or RAM usage, and in worst cases up 7GB usage. If I disable the .js or refresh the site, if used with the siri shortcuts action, it stays low as ~500MB for the same task with the same video.

Any explanation, why this script uses so many resources? And if it is related to the script and/or iPadOS/macOS, is there a way to integrate it into adguard home directly?

thx in advance for any help!

cotusandro commented 1 year ago

I’m also facing the same issue in iPadOS 16. Hope @ameshkov will fix this soon.