browser constantly hangs for brief moments

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
[PCMartin]

Re: browser constantly hangs for brief moments

Unread post by [PCMartin] » 2021-04-11, 19:54

Kris_88 wrote:
2021-04-10, 08:08
I can't confirm the problem with gmail.com.
Thank you, Kris_88. I think you're right. I've had a Gmail tab pinned and loaded in Pale Moon for around 24 hours, during which time I've composed several emails in pop-out tabs and was careful to never load any YouTube tabs, and I've experienced no hangs and (apparently) no accumulating memory bloat.

My revised conclusion is that Gmail is badly affected by hangs caused by YouTube, but is not currently* an independent source of major problems.

I really appreciate your taking the trouble to test Gmail independently. I can tolerate having to load YouTube in Brave (along with Netflix and a small assortment of other unsupported sites), but moving Gmail out of Pale Moon was a major inconvenience.

*Again, it seems to me that Alphabet/Google changes its behind-the-scenes coding rather frequently, so my revised conclusion may not hold indefinitely.

New Tobin Paradigm

Re: browser constantly hangs for brief moments

Unread post by New Tobin Paradigm » 2021-04-11, 21:17

2016 called they want their deep analysis about Google scripting back.

graymatter

Re: browser constantly hangs for brief moments

Unread post by graymatter » 2021-04-20, 12:55

I was about to make a post here when I stumbled on this one. I have exactly the same problem, as does my wife. We have had it for a few weeks. Our kids don't have the problem on their PC's. The only thing in common between the two machines is that both have an ASUS B350-F Gaming motherboard. The kids have different motherboards.

A few points:

* We both also have the same problem on Firefox.
* My wife has no extensions or addons on Palemoon. I have some.
* The delay seems to be tied to the number of tabs that the browser has open (but not loaded). More tabs results in a longer delay.
* I can reproduce the problem by starting the browser with a scrollable page active. I can then scroll up and down without any issues. Opening a new tab will start the freezing. At that point if I switch to the previous tab I would get freezes while scrolling.
* The whole of Palemoon (and Firefox) freezes when this problem occurs. I can't switch tabs, the painting of the tab headers sometimes locks up.
* I duplicated the problem with Firefox without having any tabs that have loaded pages. I did this by closing my browser with a blank page active. I then opened the browser again so the blank page was visible. I left the browser open for about 10 minutes and when I returned to the browser I opened a new tab and the hanging started. I did a bunch of work trying to find the issue on Firefox (e.g stack traces and profiles).
* I don't think this isn't a GMail or any website problem. I am pretty sure it's environmental in some way. Both Firefox and Palemoon started experiencing the problem without any updates to either at the time. It started 3-4 weeks back. Maybe even 4-5 weeks.

I am a developer so I might be able to help track down some things.

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: browser constantly hangs for brief moments

Unread post by moonbat » 2021-04-20, 15:21

graymatter wrote:
2021-04-20, 12:55
I was about to make a post here when I stumbled on this one.
You should make a separate post given that no 2 browser hangs need be identical.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

Hugga

Re: browser constantly hangs for brief moments

Unread post by Hugga » 2021-04-20, 15:23

I downgraded back to PM 28.0.0 a few days ago and haven't had a problem since. So I'm incrementally and slowly going to try updates until it breaks.

New Tobin Paradigm

Re: browser constantly hangs for brief moments

Unread post by New Tobin Paradigm » 2021-04-20, 15:35

Oh god. Your profile is corrupt if you didn't create a new one. Not to mention 28.0.0 had a major flaw and is two years out of date on security patches.

Christ.

[PCMartin]

Re: browser constantly hangs for brief moments

Unread post by [PCMartin] » 2021-04-20, 20:32

graymatter wrote:
2021-04-20, 12:55
I don't think this [is] a … website problem.…
For what it's worth, my Pale Moon memory leaks and hangs ended completely when I stopped loading YouTube tabs and playing embedded YouTube videos in Pale Moon. I began opening YouTube links exclusively in my primary fallback browser, Brave, around nine days ago, and Pale Moon seems to have been behaving normally ever since (knock on wood!).

I'm only a lay user with an extremely limited understanding of what goes on behind the scenes, but what Moonchild and others have written about sloppy "garbage-flagging" practices in websites coded for multi-process browsers seems to explain my former problem. I don't know whether it explains any part of yours.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35478
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: browser constantly hangs for brief moments

Unread post by Moonchild » 2021-04-20, 21:02

For the record, I regularly play YT videos (both on the YT site and embedded) in my Pale Moon browser (With ABL active) but it doesn't cause long-term issues. Perhaps the specific leakage occurs due to YT ads that are mostly filtered out in my setup?
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

New Tobin Paradigm

Re: browser constantly hangs for brief moments

Unread post by New Tobin Paradigm » 2021-04-20, 21:11

How long is your session though?

User avatar
Vultural
Moonbather
Moonbather
Posts: 70
Joined: 2015-08-26, 16:32
Location: Cheung Chau

Re: browser constantly hangs for brief moments

Unread post by Vultural » 2021-04-21, 00:57

Hugga wrote:
2021-04-20, 15:23
I downgraded back to PM 28.0.0 a few days ago and haven't had a problem since. So I'm incrementally and slowly going to try updates until it breaks.
Ooh, I actually did this as well, earlier.
It did not resolve my problem, so I went back to 29.
The more astute advised me to create a new profile, while I did.
I never mentioned trying the rollback because I was slightly embarrassed.
Image

[PCMartin]

Re: browser constantly hangs for brief moments

Unread post by [PCMartin] » 2021-04-21, 01:38

Moonchild wrote:
2021-04-20, 21:02
I regularly play YT videos (both on the YT site and embedded) in my Pale Moon browser (With ABL active) but it doesn't cause long-term issues. Perhaps the specific leakage occurs due to YT ads that are mostly filtered out in my setup?
I use uBlock Origin with a healthy complement of subscriptions, and I literally don't remember the last time I saw an "injected" ad in YouTube. Before uBlock Origin, I ran Adblock Latitude, and before that probably Adblock Plus. In Brave, I run uBlock Origin with pretty much the same set of subscriptions I use in Pale Moon. I see no ads there, either, and haven't noticed any YouTube issues (other than annoying differences in playlist behavior and wildly excessive CPU usage on some, but not all, livestreams).

On the other hand, in Pale Moon I also run eMatrix with a number of ad-serving and tracking sites blacklisted globally. These definitely include some Google-related sites. As an ordinary (ignorant) user, I can only hazard a wild guess that YouTube might be mounting some kind of cumulative "counteroffensive" to having its ad and tracking sites blacklisted in eMatrix but doesn't react the same way to uBlock Origin (or other ad-blockers) used in isolation. I suppose I should try YouTube again with eMatrix disabled for its entire scope or with the eMatrix extension temporarily disabled, relying only on uBlock Origin, and see how that goes.

Final On-Topic Note: While I was still loading YouTube in Pale Moon, RAM usage jumped and hangs began and increased in severity with each YouTube tab loaded. When a YouTube tab was closed, RAM usage dropped somewhat but never returned to the previous baseline, and the hangs continued unabated. After several hours and 20–30 YouTube videos, RAM usage could easily climb to over 2.7GB and hangs could last as long as 8–10 seconds. Restarting Pale Moon wiped out the accumulated RAM bloat, starting out with RAM usage under 700MB and no hangs. In other words, unlike you, I did have long-term "YouTube" issues that Pale Moon didn't recover from during the browsing session. I prefer to use Pale Moon for as much of my browsing as possible, and your experience leaves me hope that I may be able to return to using it for YouTube.
Off-topic:
BTW, a very belated thanks for your warning about NoScript. Even though I had started having weird minor issues in Pale Moon, I dragged my feet for quite a while because (1) I had invested a good decade in "training" NoScript and (2) I dreaded having to rebuild my profile from scratch. But I finally dumped NoScript and replaced it with … uMatrix at first and then eMatrix? … and those weird minor issues went away. Anyway, I don't understand how NoScript screws up Pale Moon, but it apparently does, so thank you.

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: browser constantly hangs for brief moments

Unread post by moonbat » 2021-04-21, 04:04

[PCMartin] wrote:
2021-04-21, 01:38
As an ordinary (ignorant) user, I can only hazard a wild guess that YouTube might be mounting some kind of cumulative "counteroffensive" to having its ad and tracking sites blacklisted in eMatrix
Try paranoid instead :P
They have better things to do than target specific adblockers, least of all the fork of a discontinued one that targets a browser used by less than a fraction of a percent of internet users.
The only thing you need to blacklist globally to prevent ads in Youtube is doubleclick.net and all subdomains. eMatrix requires some common sense to use (for example, many sites use CDNs that are different but similarly named domains these days so you will need to allow content from them on the site in question. For example, Facebook uses fbcdn.net and so on. Just looking at your eMatrix panel showing detected domains on the page you should be able to guess from the names whether a CDN is relevant for the site or not. Enable whatever was blocked from it and reload the page to see if it works, and if it does then make the exception permanent using the lock icon. And if the site in question relies on non advertising 3rd party sites (for example, sign-in using Google, or recaptcha), you need to enable those domains as well. Recaptcha requires scripts from gstatic.com and scripts and frames from google.com to work properly.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

[PCMartin]

Re: browser constantly hangs for brief moments

Unread post by [PCMartin] » 2021-04-21, 06:31

moonbat wrote:
2021-04-21, 04:04
Try paranoid instead :P * * * *
Meh. I don't think it's necessarily paranoid to imagine that when YouTube is unable to connect at all to certain ad-serving and tracking domains, it generically keeps trying over, and over, and over, and over (I could go on… ;) ), irrespective of whether the cause is eMatrix in Pale Moon specifically. But again, it was just a wild, uneducated guess. Whether there is a qualitative difference in the way eMatrix blocks elements from certain domains from the way uBlock Origin does it is beyond my ken.

And actually, even though I'm just an ordinary user, I've been using scriptblockers for a long time and am pretty comfortable figuring out what to allow and what to block from what domains. Requisite CDNs are usually pretty obvious just from the name (sometimes because it's similar to the site name, sometimes because it's one affiliated with the site's parent company). Those that aren't obvious, I soon discover iteratively. I've already globally blocked doubleclick.net, globally allowed gstatic.com, and blocked Facebook-affiliated domains with every tool in my arsenal. I don't actually have difficulty making eMatrix work. I was just trying to grasp for a potential explanation of why YouTube doesn't cause long-term problem for Moonchild while it does for me.

The other potential explanations look to involve a fair amount of work: one or more of my 59 extensions other than eMatrix, or one or more of my uBlock Origin subscriptions. I'm very low on energy since getting the disease-whose-name-shall-not-be-mentioned-lest-it-provoke-a-flame-war-between-hoaxers-and-true-believers, so I'm not super-enthusiastic about going through the requisite process of elimination. My gut tells me that uBlock, eMatrix, and Toogle Autoplay are the only extensions I have that are likely to interfere much with YouTube, but what do I know? As for uBlock subscriptions, I'm going to go with EasyList Liste FR, because, well — France, right? ;)

But seriously, for now I'm just delighted to have found a workaround (loading YouTube in Brave) that leaves Pale Moon running normally for me. Over time, I will try to nail down the reason YouTube apparently works okay in Pale Moon for some people but not for me.

graymatter

Re: browser constantly hangs for brief moments

Unread post by graymatter » 2021-04-21, 07:17

moonbat wrote:
2021-04-20, 15:21
You should make a separate post given that no 2 browser hangs need be identical.
My Firefox issues were solved with the upgrade to V88 today. I am not sure which bug fix sorted out the issue as it's a bit difficult to get a full list of issues solved by the FF release. Maybe someone knows a link or way to get that list then I could search through to see if anything is similar. How in sync is PM with FF?

coffeebreak
Moon Magic practitioner
Moon Magic practitioner
Posts: 2986
Joined: 2015-09-26, 04:51
Location: U.S.

Re: browser constantly hangs for brief moments

Unread post by coffeebreak » 2021-04-21, 09:20

graymatter wrote:
2021-04-21, 07:17
My Firefox issues were solved with the upgrade to V88 today. I am not sure which bug fix sorted out the issue as it's a bit difficult to get a full list of issues solved
A quick web search for 'firefox release notes' found: Firefox 88.0 Release Notes + Complete list of changes for this release

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: browser constantly hangs for brief moments

Unread post by moonbat » 2021-04-21, 10:21

@PCMartin - one way to debug the problem is to observe the logs of both uBO and eMatrix when opening a Youtube page to see what's getting blocked(use the filter and type -- to show only blocked elements). Off the top of my head, there's a URL pattern called gen_204 or similar that's constantly attempting to connect, probably some sort of video statistics thing, that gets caught by most of the popular filter subscriptions. And then of course whatever gets blocked from doubleclick. See if you have anything else being blocked from Youtube and its related domains (ytimg.com or something IIRC) and we can start from there.
graymatter wrote:
2021-04-21, 07:17
How in sync is PM with FF?
They are entirely different code bases at present with just a common fork point (version 24), but a diff could indicate what area of code was changed even if it doesn't map exactly.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

New Tobin Paradigm

Re: browser constantly hangs for brief moments

Unread post by New Tobin Paradigm » 2021-04-21, 10:28

Moonbat, you are trying to answer questions you don't have the answer to again.

person45
Fanatic
Fanatic
Posts: 104
Joined: 2017-10-20, 07:00

Re: browser constantly hangs for brief moments

Unread post by person45 » 2021-04-22, 22:47

Moonchild wrote:
2021-04-20, 21:02
but it doesn't cause long-term issues.
Youtube seems fine for me without causing lag.

The outlook hotmail is definitely an issue.

person45
Fanatic
Fanatic
Posts: 104
Joined: 2017-10-20, 07:00

Re: browser constantly hangs for brief moments

Unread post by person45 » 2021-04-22, 22:54

[PCMartin] wrote:
2021-04-21, 01:38
After several hours and 20–30 YouTube videos, RAM usage could easily climb to over 2.7GB and hangs could last as long as 8–10 seconds. Restarting Pale Moon wiped out the accumulated RAM bloat, starting out with RAM usage under 700MB and no hangs.
That's the same solution I've found. Restarting works to stop the lag.

Are you doing something different on youtube compared to average? Are you uploading videos, watching live streams, or typing in chat? If you don't mind, can you narrow down the issue to specific video channels?

I think I read on Reddit that youtube can use experimental code on some users that they test out before releasing it to a wider audience.

[PCMartin]

Re: browser constantly hangs for brief moments

Unread post by [PCMartin] » 2021-04-26, 20:54

person45 wrote:
2021-04-22, 22:54
Are you doing something different on youtube compared to average? Are you uploading videos, watching live streams, or typing in chat? If you don't mind, can you narrow down the issue to specific video channels?

I think I read on Reddit that youtube can use experimental code on some users that they test out before releasing it to a wider audience.
Sorry for the delay in getting back to you; I thought I had but I apparently didn't actually "submit." That's actually a good thing, since I've done a little more testing. But first, I think I'm a very average YouTube user:
  • I've never uploaded anything to YouTube other than regular comments to regular, prerecorded videos.
  • I watch livestreams pretty infrequently (once or twice a month?).
  • I tried typing in live chat once (and it was in Pale Moon), but the input delay was 10-30 seconds per keystroke, so I gave up.
  • I haven't noticed that the problem is limited to specific channels. I'm pretty sure I've run into it when I've watched nothing but a succession of anodyne music videos from different channels, though I admittedly don't do that often enough to have formed a reliable sample.
I tried disabling the eMatrix extension, but I didn't like the results on some non-YouTube sites I regularly visit, so I soon re-enabled it.

I then disabled eMatrix for the entire YouTube scope. (Previously, when eMatrix rules were enabled for YouTube, everything had been enabled for YouTube except stuff from globally blacklisted domains like doubleclick.)

I didn't change anything in uBlock Origin. Some of the filter lists I subscribe to may have gotten updated behind the scenes.

Since the eMatrix change, I haven't noticed any hangs, lags, or typing dropouts. YouTube tabs continue to take up a fair amount of RAM and YouTube memory leaks continue to accumulate, but not as quickly as before. (When I close a YouTube tab, more RAM is released than previously, but definitely not all of it. The more YouTube tabs I've opened in a session, the more RAM usage seems to climb, albeit more slowly.)

But precisely because Alphabet/Google runs experiments and changes YouTube code rather frequently, it's hard to know whether anything I did contributed to the improvement. (Even to a technically illiterate user like me, the frequency with which youtube-dl* breaks and has to be updated is a pretty big indicator of just how often YouTube code gets changed.) Over the past year or so, I've noticed memory bloat and hangs get worse for a time, and then get better again for a time, with no action at all on my part.

Regardless, with no hangs (for now, knock on wood) and slower memory bloat, I'm ready to return to using Pale Moon for my YouTube browsing for the time being. I run the CPU & Memory Usage Statusbar extension, so it's easy to keep an eye on how much RAM Pale Moon is using and when it might be a good time to restart and flush all of the leftover crap from YouTube. If hangs, lags, and typing dropouts start happening again and I can't fix them, I'm going back to Brave for YouTube.

That's all I have for now. If there are any interesting/useful developments on my end, I will try to remember to post about them here.

Off-topic:
*youtube-dl is widely used and relied on by journalists, documentarists, academics, political activists, and lawyers for fair-use purposes. It was pressure from them that caused youtube-dl to be rather quickly reinstated on Github after the RIAA had it taken down. It can also be used to download public-domain material (and it works on a couple hundred sites other than YouTube). In short, it's not just for pirates.

Locked