Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

video-swap script causing browser to freeze after prolonged use #278

Open
DrunkenMonk0001 opened this issue Aug 26, 2024 · 13 comments
Open

Comments

@DrunkenMonk0001
Copy link

When leaving a twitch page open for an hour or two then closing the tab, the entire browser becomes unresponsive for a while, the longer the twitch page was left open, the longer the browser is unresponsive for.
Happens when using either ublock to execute it or as a userscript with tampermonkey

Repository owner deleted a comment Aug 26, 2024
Repository owner deleted a comment Aug 26, 2024
Repository owner deleted a comment from revunix Aug 26, 2024
@pixeltris
Copy link
Owner

Are you able to reproduce this behavior with any other of the solutions linked in the readme? i.e. disable the scripts and try the others. Are you able to reproduce this behavior without any solution active at all? Does the tab have high memory usage or anything abnormal?

@DrunkenMonk0001
Copy link
Author

Are you able to reproduce this behavior with any other of the solutions linked in the readme? i.e. disable the scripts and try the others. Are you able to reproduce this behavior without any solution active at all? Does the tab have high memory usage or anything abnormal?

It's an issue with both the userscript with tampermonkey or using the ublock version of the script in ublock, I've not noticed considerable RAM usage and the other solutions on the page tend to either mean interruptions in viewing (ad being blocked) or increased latency to the broadcast, so the other solutions are fairly undesirable - though I haven't tried the vaft userscript, so as far as I'm aware the behaviour is limited to video-swap-new, but I'll try vaft and update if it's the same

@DrunkenMonk0001
Copy link
Author

DrunkenMonk0001 commented Aug 27, 2024

the vaft script appears to not have that issue at all, just the known issue of the video freezing occasionally around the time of ads

*edit: nevermind, it does still happen but it seems to take longer to build up

@pixeltris
Copy link
Owner

I checked this out on a stream with frequent midrolls while using video-swap-new on Source quality. There is some growth of memory for me but it's the same amount of memory growth when compared to no solution applied.

Closing the tab after being open for several hours with frequent midrolls doesn't freeze the browser for me and the tab closes fast.

I tested this on Firefox.

@DrunkenMonk0001
Copy link
Author

I checked this out on a stream with frequent midrolls while using video-swap-new on Source quality. There is some growth of memory for me but it's the same amount of memory growth when compared to no solution applied.

Closing the tab after being open for several hours with frequent midrolls doesn't freeze the browser for me and the tab closes fast.

I tested this on Firefox.

Hmm that appears to be an odd exception. Perhaps it's related to having extra tabs open at the same time? I couldn't give an exact use case since I've never had it not happen, I had a friend try it on a fresh install of windows 11, installed firefox, installed adblock plus, tampermonkey with video-swap-new. They still experienced the same symptoms, the entire browser becomes unresponsive and are unable to open new tabs or close any.

I've attached a video that was recorded immediately after closing a twitch tab, each time the mouse is moved to a new tab, I was clicking and the tabs were unresponsive.

Untitled.video.-.Made.with.Clipchamp.1.mp4

It was also visible when closing the second twitch tab, but for a much shorter duration (page was open for much less time)

This behaviour only occurs when using either of the available userscripts and is repeatable on a fresh install of both windows and firefox. It even happens when subbed to a channel (no ads). The time I began noticing it was after 3-4~ hour streams, the user would raid a new channel and the browser would freeze during the raid redirect for up to 20 seconds in the worst cases.

This is also on the following desktop specs;
Ryzen 7 5800
64GB 3600mhz DDR4
RTX4080
gen4 m.2

@pixeltris
Copy link
Owner

It even happens when subbed to a channel (no ads)

So the behavior can be observed when there are no prerolls or midrolls being served?

My previous test was on Linux. Today I tested W10, fresh firefox + uBlock Origin + tampermonkey + video-swap-new. I did this on a VM as well as a laptop with with low RAM for about 5 hours. One had a preroll, the other had neither prerolls or midrolls. I couldn't reproduce the issue. The Twitch tab RAM started at around ~300MB and finished at around ~350MB after 5 hours.

@DrunkenMonk0001
Copy link
Author

My previous test was on Linux. Today I tested W10, fresh firefox + uBlock Origin + tampermonkey + video-swap-new. I did this on a VM as well as a laptop with with low RAM for about 5 hours. One had a preroll, the other had neither prerolls or midrolls. I couldn't reproduce the issue. The Twitch tab RAM started at around ~300MB and finished at around ~350MB after 5 hours.

My firefox as of right this moment when messaging has 3gb of ram total in use with 460MB~ RAM usage after an hour, and it's fairly typical to cap a twitch tab around 400-500MB~ I can only assume depending a little on the bitrate. It will remain around that much RAM usage and the issue will happen again today with 100% certainty.

If you have an idea for better data collection on the subject, I'd be happy to assist in it any way I can.

So the behavior can be observed when there are no prerolls or midrolls being served?

I believe that to be accurate, yup.

@pixeltris
Copy link
Owner

pixeltris commented Sep 18, 2024

I'm curious if you're able to reproduce #251. It sounds related

@Piskemannen
Copy link

I'm curious if you're able to reproduce #251. It sounds related

I got a problem using the uBlock script where videos freeze during ads (sound still playing), instead of going down to 480p quality. Do you recommend using a better alternative that actually works? I've checked several comments on extensions saying they don't work.

@pixeltris
Copy link
Owner

pixeltris commented Sep 18, 2024

@Piskemannen this issue isn't the place for that question. video-swap-new generally doesn't have many freezing issues (where as vaft can have a lot of problems). If you're still having problems just try a different solution. There is a list of recommendations in the README.

@DrunkenMonk0001
Copy link
Author

DrunkenMonk0001 commented Sep 19, 2024

I'm curious if you're able to reproduce #251. It sounds related

Left a VOD playing for 3 hours and never experienced any issues and the freeze didn't occur for me when exiting the tab, unfortunately seems unrelated

I don't imagine it's too helpful but here's some screengrabs of the console output on a page that had frozen when closing another page

image
image

@Chassss
Copy link

Chassss commented Sep 29, 2024

The freezing is just a twitch issue, ive completely disabled all extensions and it still happens and even used a fresh brave install rather then chrome, it happens if you pause vods alot/chapter select alot and for live streams it hpapens when you pause alot

@DrunkenMonk0001
Copy link
Author

The freezing is just a twitch issue, ive completely disabled all extensions and it still happens and even used a fresh brave install rather then chrome, it happens if you pause vods alot/chapter select alot and for live streams it hpapens when you pause alot

No it's not. If I disable this script it never happens and can't reproduce it without the script. Can leave a 24 hour stream up subbed or unsubbed and it doesn't exhibit the same behaviour with the script disabled. I also don't use a chromium based browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants