return-youtube-dislike icon indicating copy to clipboard operation
return-youtube-dislike copied to clipboard

(Bug): Random memory leaks

Open jericjan opened this issue 3 years ago • 8 comments

Browser

Google Chrome

Browser Version

Version 96.0.4664.45

Extension or Userscript?

Extension

Extension/Userscript Version

1.0.0.2

What happened?

It seems to be completely random but I know that it's from this extension because when the memory leak happens, my PC gets super slow and when I disable the extension, it instantly goes back to running normally. I can't provide a video link because as I said, it's completely random. Iirc, I've mostly seen it happen when I'm not focused in a YT tab but that could be completely unrelated.

jericjan avatar Dec 03 '21 12:12 jericjan

Screen Shot 2021-12-04 at 4 02 41 PM Screen Shot 2021-12-04 at 4 02 02 PM

Been trying to reproduce, so far no luck.

PickleNik avatar Dec 04 '21 21:12 PickleNik

I can't seem the reproduce this either. Could you show us the Chrome Task Manager to show high memory usage?

Frontesque avatar Dec 04 '21 21:12 Frontesque

Finally saw it happen. Still random though. 01 02 It just shows me that the Browser itself is all of a sudden using a ton of CPU. And when I disabled and re-enabled the extension, it immediately dropped as seen in the second image.

jericjan avatar Dec 05 '21 12:12 jericjan

I think I have a theory for why this happens and why yall can't reproduce it. It might not even be a memory leak.

I open lots of YouTube tabs, probably in the hundreds. While I'm opening them one by one, the extension doesn't use up all of my CPU. It seems to happen when the hundreds of tabs have been "discarded" by Chrome from inactivity and I come back to the window and it's as if every single tab is being worked on at once by the extension.

Just today, Chrome's Task Manager told me that the Browser used up 700% of my CPU, which doesn't even make sense because I only have 2 cores.

I disabled the extension again and well, the usage dropped like I expected.

I'm still not 100% sure this is the real cause but I think an update where it doesn't work on unfocused tabs would be the fix for it perhaps.

jericjan avatar Dec 13 '21 14:12 jericjan

I open lots of YouTube tabs, probably in the hundreds. While I'm opening them one by one, the extension doesn't use up all of my CPU. It seems to happen when the hundreds of tabs have been "discarded" by Chrome from inactivity and I come back to the window and it's as if every single tab is being worked on at once by the extension.

That's a good theory and I'll have to do some testing on that. Based on the way that chrome extensions work, that might actually be possible.

Just today, Chrome's Task Manager told me that the Browser used up 700% of my CPU, which doesn't even make sense because I only have 2 cores.

As for the 700% thing... I know that chrome may display up to "200%" if you have a hyperthreaded processor (eg 2 cores 4 threads) but I've never heard of 700%.

Frontesque avatar Dec 13 '21 14:12 Frontesque

I encountered it again today. I tried closing the tabs themselves, but it still used up around the 100% range of my CPU. No tabs open whatsoever. Restarted the extension and back to normal again.

jericjan avatar Dec 23 '21 15:12 jericjan

I encountered it again today. I tried closing the tabs themselves, but it still used up around the 100% range of my CPU. No tabs open whatsoever. Restarted the extension and back to normal again.

thanks for report

Anarios avatar Dec 23 '21 15:12 Anarios

Also getting hit about once a week with high CPU, toggling off/on the extensions clears it I usually have two chrome windows with a large number of tabs open (40+), including several youtube videos, generally a few paused. I tend to see it when coming back to my laptop after 30 mins plus and unlocking. Not seen it after a start from hibernate. I enabled the "collect errors" option in the extension manager. Happy to run more debug if requested

Karlos-Fandango avatar Jan 08 '22 12:01 Karlos-Fandango