[adblocker-electron] Application is extremely lagged (memory leak)
JellyBrick opened this issue · comments
7782d67
Performance regression occurred after that commit.
(This issue does not occur in versions 1.26.3
and earlier)
Code
https://github.com/organization/youtube-music-next/blob/feat/typescript/plugins/adblocker/blocker.ts
Related issues
th-ch/youtube-music#1187
th-ch/youtube-music#1208
th-ch/youtube-music#1212
Hi @JellyBrick,
Thanks for reaching out and sorry for the delay in answering. This looks like a serious issue and multiple people have already encountered it. At the moment I have limited bandwidth (and limited knowledge about Electron stack) so I am not able to investigate it myself. I'm gonna ping a few people who are familiar with it in the hope that we can get some clarity regarding the root cause of the slow-down.
@DrRoot-github since you opened the PR and are most likely the person with most insights in the change, would you have some availability to look into it? I believe @Jelmerro also investigated as part of the issue on Vieb-side.
Could this issue be caused by using sendSync
from the page? Alternatively, maybe we are returning too much on updates (e.g. maybe we wrongly return scriplets or too many selectors).
I hope that helps,
I'll try to investigate a bit more, so please wait a little longer. If possible, it would be helpful if you could provide specific instructions on how to reproduce it. I think I might be the culprit, seriously sorry.
@DrRoot-github No worries at all, I think I found the issue and created a PR to fix it here: #3441 Would you have time to review it and maybe test that the blocking of ads in YouTube didn't regress? (from some local testing it seems fine).
Cc @Jelmerro once reviewed we can publish an update of the adblocker package (as early as today if anyone has time to review the changeset).
Thank you @KunaPrime and @Jelmerro, I have merged the PR and a new release will be available shortly.
The release pipeline got broken by some upstream dependency updates. Until it gets fixed, I have pushed a canary release manually which you can try out: https://www.npmjs.com/package/@cliqz/adblocker-electron/v/1.26.7--canary.50688cf.0
This issue is still reproducible in v1.26.8
Could you provide some more details about this please?
I found the problem that the responsiveness of the webpage has decreased over time.
(Electron 27.0.0)
Tested webpage: https://music.youtube.com