mirror of
https://github.com/tubearchivist/browser-extension.git
synced 2026-03-23 20:37:07 +00:00
[GH-ISSUE #60] Cripplingly high cpu usage on specific youtube videos (Firefox) #38
Labels
No labels
bug
bug
duplicate
enhancement
help wanted
invalid
not an issue
not an issue
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
tubearchivist/archived-browser-extension#38
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Msprg on GitHub (Nov 29, 2025).
Original GitHub issue: https://github.com/tubearchivist/browser-extension/issues/60
So this was very hard to pinpoint, but I have finally traced this weird issue of "random" YouTube videos causing CPU load so high that the whole Firefox starts to stutter, and the video is heavily stuttering as well.
I'm thus making this issue in hopes of getting help in pinpointing the specific source of the issue, as I have zero experience regarding browser extensions development.
This is pretty difficult to reproduce, as there's lots of variables, many of which seem to unexpectedly change:
I can reproduce the issue with this specific video: www.youtube.com/watch?v=lLDFSfla4TE This is the video I've been testing with most recently, but it seems that there are many other videos that trigger the high cpu usage but not as consistently. Then, the high cpu usage is often accompanied by heightened memory usage. Normal usage is between 350 and 500 MBytes of memory. When the extension bugs out, it tends to jump to 1GB and often continues to rise.
Moreover, the impact seems to vary from one specific video to another. Some videos just "struggle" to start - meaning the CPU usage is high initially, but quickly comes down to 'more reasonable' levels (I've never really checked, but it's low enough for uninterrupted playback).
In other cases, it's so bad, that I have had to copy the video URL, and open it in another browser - or download it - just in order for me to be able to watch it. Or, I've found my system ram totally maxed out as I left the YouTube tab open, and it was constantly consuming more and more memory 28 GB's worth of for example -- all the while using loads of cpu%.
So far, I can only provide this information:
I can see that the extension seems to get loaded, but don't see any specific errors:
What will, however, will likely be most helpful: I've recorded a trace using Firefox profiler. You can see the memory usage increasing when I start loading the YouTube video url, as well as the "jank" marker indicating issues starting at around the 5-second mark from the beginning of the profile recording. https://share.firefox.dev/3Y27zJO
@bbilly1 commented on GitHub (Nov 30, 2025):
How did you confirm that this is related to this extension and this extension only? Not sure if the profile output is showing that.
What I'd suggest:
Then
about:processesgives some although not super helpful insights in what is taking up resources.These could also just be shenanigans from YT, maybe related to ublock origin or similar.
@Msprg commented on GitHub (Nov 30, 2025):
Hi,
Yes, that's exactly how I figured it out. As of right now, it's pretty reliably reproducible by enabling / disabling the extension in the browser. Since it seems to be happening with or without other extensions as well, I've come to the conclusion that it isn't affected by some other extension like ublock or sponsor block.
That only ever shows the specific YouTube tab to be using all the CPU and copious amounts of memory, not the extension. I suppose that's because the JavaScript that's running is considered part of the YouTube web page container at that point.
That's also the reason it was so hard to diagnose the issue for me, because I had to figure out what extension was to blame by specifically going one-by-one until I happened to disable the tubearchivist extension. (and then confirmed by leaving all other disabled and only enabling tubearchivist)
@yreefboi commented on GitHub (Dec 1, 2025):
I can attest to experiencing this same issue with Firefox 145.0.2 on an M4 MacBook Air on macOS Sequoia 15.5 as well as on a generic AMD based Arch setup with KDE Plasma.
I went through the extensions one by one. Sometimes opening the video in a new tab over and over will lead to a working "session", it also appears to happen fairly random, I haven't noticed a specific pattern yet. As soon as I enable the TA browser extension and use a known faulty video it immediately starts freezing within seconds.
Using the built in task manager the tab uses a godly amount of CPU ressources and also jumps in memory utilization to about 2 gigabytes within seconds, whereas a healthy tab seems to sit between 500 megabytes and 1 gigabyte.
If there's ressources you wish for me to provide please let me know.
@FraYoshi commented on GitHub (Jan 5, 2026):
After weeks of confusion about high CPU usage, reported on
about:processesunder the "Extensions" process, I've finally pinpointed the culpit to be tubearchivist...Testing method: disabled each extension one by one, and reactiveted. tubearchivist would stay at 99/180% each time if activated. Leaving it disabled solves the problem. Also, over 8GB of memory just the extension, versus 2GB of the others combined.
Here the video I was watching: https://www.youtube.com/watch?v=bwddK_qXCc4
@bbilly1 commented on GitHub (Jan 6, 2026):
Then next thing what I'd would debug is to check, if that is a firefox only thing, or if same in chrome is also happening.
Also in firefox, try in a blank profile, try logged in and logged out.
But ultimately just shooting into the void here, if you can reproduce it, you are in the best position to fix it. Please help with fixing it!
@FraYoshi commented on GitHub (Jan 6, 2026):
I'm unsure how to debug the thing... It appears to happen randomly while watching youtube videos... The moment I closed the tab with the cited video, stopped happening... But it continues to happen as long as the tab is open.. Hanging the whole browser, I generally notice it because I cannot longer load websites properly.. The problem persists while the youtube tab is opened.
Will conduct some tests, if I end up finding some clues will post them, at the moment I'm a loss, no idea what could trigger the spike in CPU and memory.
Adding my system at the moment of writing (and haven't rebooted since I wrote the comment yesterday:
@FraYoshi commented on GitHub (Jan 26, 2026):
For what concerns me, it has happened only a couple more times, and the last one specifically, was not related to tubearchivist, so might very well be something that has to somewhat do with Firefox extensions in general for me.. as I had to kill the whole extensions process.
Will report back if I uncover something new.
@notjosh commented on GitHub (Mar 12, 2026):
Adding another data point to this: in the last couple of days I've had the tab lock up with this addon switched on when watching videos (channel pages seem fine though).
I tried turning off other addons in case there was some conflict (i.e. maybe sponsorblock was trying to render some HTML that TA was trying to modify causing an infinite loop), but only TA was causing issues.
Haven't had a chance to look any closer yet though.