2-3 second lag in response time

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!
mweishaar

2-3 second lag in response time

Unread post by mweishaar » 2021-07-16, 00:07

First off...

Operating system: Linux (Devuan Beowulf) w/XFCE
Browser version: 29.2.1 (Steve Pusser)
32-bit or 64-bit?: 64-bit
Problem URL: any (or NONE)
Theme: Default
Installed add-ons:
- Moon Gestures 1.12.0
- Pale Moon Commander 3.0.1
- Screengrab (fix version) 0.99.12
- Toggle JavaScript 1.2.2.010
- uBlock Origin 1.16.4.29
Installed plugins: (about:plugins) NONE

I have been a Pale Moon user for many years now and it is really the only browser I use. I have never had an issue that wasn't solved pretty quickly. But this one has me pulling my hair out.

I only started seeing an issue several days ago. PM started just taking a random 2-3 second delay in responding to any input.
e.g. typing this message, at random times it will pause for 2-3 seconds before I can continue typing. Quite frustrating. Scrolling on any web page it will just freeze for a second or two. Typing/using the mouse to select too. I do see a slight cpu spike every time it happens. Nothing has changed on my system except a new keyboard.

It's not dependent on a website either - it happens if I am just trying to select things from within the PM menus with no pages loaded.

I thought I had figured it out... I had the GetEm All add-on installed, and I disabled and removed it. The issue went away for about a day. Then it came back.
I tried firefox-esr (my backup, only in case of emergencies), and it doesn't have this issue.

My PC is more than capable, an AMD Ryzen 5 3600 w/16GB RAM (with only 2.6GB in use, 1.7 GB of that for PM)

This is making PM unusable for me... so I hope someone has some ideas on what the issue might be.

New Tobin Paradigm

Re: 2-3 second lag in response time

Unread post by New Tobin Paradigm » 2021-07-16, 00:27

So why are you blaming the browser for an issue that only started a few days ago? Nothing has changed with it since the last update which was nearly a month ago abd that was just a couple security patches and minor tweaks.

Perhaps you should look elsewhere for the cause.

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

Re: 2-3 second lag in response time

Unread post by Moonchild » 2021-07-16, 01:21

This sounds like a typical problem of visiting a site that does dynamic updates of content but never actually reloads the document, leaks all over the place, and combined with leaving the browser open ON such pages for days or weeks (and even restored sessions may have bloat in the saved viewers), making the garbage and cycle collectors run out of headroom. The pauses in that case are caused by non-incremental GC/CC runs trying to recover resources but failing because the websites are such slobs that they keep a lot of resources locked.

A restart of the browser would fix this kind of thing, so if you changed extensions and issued a restart as a result, that would clear the problem. Even disabling a restartless extension could temporarily alleviate the issue giving you a red herring because it would give the browser a little extra headroom -- until that fills up too and you end up back under memory pressure (heap memory is usually not the problem here, but stack memory would be and that is limited) with the collectors trying their best to recover and failing to make a dent, then trying again, etc.

To analyse this kind of thing, about:memory reports usually give a good indication of the culprit sites. In a more limited fashion, about:performance -might- help too but if you're dealing with ghost windows or out of bounds allocations of resources it may not have anything to show.

Tobin is right though that this isn't really a browser issue even if my analysis is correct, since obviously there hasn't been a release for a month and programs don't randomly "break" when their code doesn't change ;)
"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

User avatar
Lunokhod
Lunatic
Lunatic
Posts: 469
Joined: 2017-04-20, 21:25
Contact:

Re: 2-3 second lag in response time

Unread post by Lunokhod » 2021-07-16, 02:27

There have been some kernel issues that caused this sort of thing with Nvidia graphics, don't know what you are using though, if this has changed after an update it might be worth trying some other kernel versions.
Wait, it's all Ohio? Always has been...

User avatar
ron_1
Moon Magic practitioner
Moon Magic practitioner
Posts: 2852
Joined: 2012-06-28, 01:20

Re: 2-3 second lag in response time

Unread post by ron_1 » 2021-07-16, 14:15

mweishaar wrote:
2021-07-16, 00:07
I thought I had figured it out... I had the GetEm All add-on installed, and I disabled and removed it. The issue went away for about a day. Then it came back.
I'd check and see if the profile itself is the problem. Create a new profile (you don't need to delete the old one) and see if the problem persists.

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

Re: 2-3 second lag in response time

Unread post by moonbat » 2021-07-17, 04:26

ron_1 wrote:
2021-07-16, 14:15
Create a new profile (you don't need to delete the old one) and see if the problem persists.
In fact, keep a new unmodified profile around for testing exactly such situations with performance or broken websites before you post about it so that you can rule out any problems with extensions or changed settings first.
"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

User avatar
ron_1
Moon Magic practitioner
Moon Magic practitioner
Posts: 2852
Joined: 2012-06-28, 01:20

Re: 2-3 second lag in response time

Unread post by ron_1 » 2021-07-19, 23:42

It's been 4 days . . . I wonder if the OP got the issue solved?? :think:

User avatar
LuftWafflePilot
Fanatic
Fanatic
Posts: 224
Joined: 2021-02-19, 20:46

Re: 2-3 second lag in response time

Unread post by LuftWafflePilot » 2021-07-22, 08:14

I've been having a similar problem I could never pinpoint to anything specific.
PM would randomly start lagging like crazy, typically when I type stuff like here, with the text flow randomly freezing for about 1-2 seconds, which is annoying as hell.
All those GC/CC and memory buttons don't fix it, closing various tabs with content I suspect being demanding (like Youtube, Twitch and Twitter) on performance doesn't either. The only thing that does is restarting the browser. It's extremely frustrating. Disabling Ublock Origin doesn't do anything either, and that's the only extension I have I believe could affect performance.
It's just so random there's no way to tell what triggers it. I guess it must be some shittily coded website that messes up something and somehow keeps its code in memory even after its tab is closed, because when I open Task manager and keep staring at PM's process, the CPU usage hovers around 1% for a while and then spikes to 6%+ on my quad core, and this just repeats itself.

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2183
Joined: 2018-05-05, 13:29

Re: 2-3 second lag in response time

Unread post by vannilla » 2021-07-22, 08:36

It's easy to test actually: for a whole day, don't visit any heavy site, so avoid any social media, any media hosting and so on.
Basically, avoid sites where users can upload content (videos, comments, etc.)
If by the end of the day the browser is still as fast as ever, you have your answer on why it happens.
Spoiler: it's caused by YouTube, Twitter and probably Twitch too.

User avatar
LuftWafflePilot
Fanatic
Fanatic
Posts: 224
Joined: 2021-02-19, 20:46

Re: 2-3 second lag in response time

Unread post by LuftWafflePilot » 2021-07-23, 16:36

That would make sense, but how is it possible it doesn't go away when you close the offending tab?

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

Re: 2-3 second lag in response time

Unread post by Moonchild » 2021-07-23, 17:57

Because out of necessity for resource use, performance, cross-tab data exchange when having multiple tabs open on the same site, etc etc, a browser does not treat every tab as its own universe. On top, if sites leak resources all over the place, there's even more chance of things becoming unable to clean up.

For example, if a website creates a circular object dependency, then removes the entry point to the objects that all depend on each other without freeing them first, they will get stuck in limbo -- they can't be garbage collected because the garbage collector can't know that all of these objects are disposable now; it will just see that the object is still depended on by other objects that are also still alive, so it will not be able to collect it. Now there are tracers and such in our code that can deal with some of that, but not indefinitely. So you can end up with a lot of code that is still active even if there's no website still open that uses it, which can generate a lot of work for the JS engine.
"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

mweishaar

Re: 2-3 second lag in response time

Unread post by mweishaar » 2021-08-13, 00:47

So would closing down the browser clean it up? Because I close it down every night (even though I leave my machine running).

I am the OP, and I am still seeing the problem. I actually just made a new post (then deleted it when I realized I had already posted this) :lol: :oops:

My browsing habits are pretty consistent, and I can go days without it happening. But then it comes back with a vengeance.
(I maybe visit reddit/youtube/imgur/bbc/arstechnica and some google searches)

New Tobin Paradigm

Re: 2-3 second lag in response time

Unread post by New Tobin Paradigm » 2021-08-13, 01:45

Maybe you should answer the questions put to you and also reflect on the valuable information presented before demanding even more on a silver platter.

User avatar
ron_1
Moon Magic practitioner
Moon Magic practitioner
Posts: 2852
Joined: 2012-06-28, 01:20

Re: 2-3 second lag in response time

Unread post by ron_1 » 2021-08-13, 17:08

mweishaar wrote:
2021-08-13, 00:47
So would closing down the browser clean it up? Because I close it down every night (even though I leave my machine running).
It would free any memory being consumed. That's it, afaik. Do you keep a bunch of tabs open all the time? Again, I say try running PM in a new profile and see what happens.

mweishaar

Re: 2-3 second lag in response time

Unread post by mweishaar » 2021-08-13, 19:15

Thanks to those who offered helpful ideas or comments: moonchild, Lunokhod, ron_1, moonbat, LuftWafflePilot, vannilla.

Today I learned how to create a new profile, and did that. It seems to have helped.. but time will tell. I've done other things that seemed to help in the past, only for the issue to come back. I can now try the new profile when the problem reappears. Good tip to keep one around. Although, if does end up being the profile, is there any way to tell what in the profile is the problem? Or is the answer to just create a new one, import bookmarks, and move on? The odd part is that the problem comes around for a while, stays through browser restarts (nightly)... then goes away for several days. I would think that if it was something in the profile it would happen more consistently. But I don't know the ins-and-outs of HOW all this works. :D

Lunokhod, I used to have an Nvidia card, but now have an AMD. My kernel has been updated to 5.10. That was all done around Apr this year. I think that the problem only manifested on the Ryzen/AMD setup... but that could be total coincidence.

ron_1, I don't keep a lot of tabs open at once. I'd say at most 10, and for no more than several hours. And every evening I close the browser, although my machine stays running.

Vannilla, I would say I visit youtube every few days, maybe. I don't do Twitch/Twitter/FB. I used to have IG but don't use it anymore. I do look for entertaining stuff on Imgur / Reddit on occasion. I'll keep a closer eye on what sites I've visited and browser uptime when the problem strikes.

I should also note that when the problem was happening, I launched firefox-esr and it was fine. That was really to rule out any other kind of system-wide problem.
Today I was able to grab a screenshot of the cpu spiking as the problem was happening. Note that in the TIME+ column it indicates that palemoon had only been running for 31 minutes. The process is at 92% spike during a 'pause', and you can see several others that had happened in the gkrellm monitor to the right.

Image

Again, thanks for all the helpful comments.

User avatar
Lunokhod
Lunatic
Lunatic
Posts: 469
Joined: 2017-04-20, 21:25
Contact:

Re: 2-3 second lag in response time

Unread post by Lunokhod » 2021-08-13, 19:59

All GPU makes can and do get bugs, so it might still be something like that, especially if it's only on a particular machine (although if it's been using the same kernel since April that does seem less likely). If it was, it's possible there could be something in the system logs when the lag happens which would give a clue, it might already be recorded from previous occasions. And starting Pale Moon from the command line and leaving that terminal open would show if any messages from Pale Moon appeared coinciding with the problem.
Wait, it's all Ohio? Always has been...

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

Re: 2-3 second lag in response time

Unread post by moonbat » 2021-08-16, 08:28

mweishaar wrote:
2021-08-13, 19:15
is there any way to tell what in the profile is the problem?
There is - you will have to disable each extension one by one and restart the browser after disabling each one until you find out which one caused the problem. For video issues, flip the hardware acceleration setting in preferences and see if it makes a difference - after first ensuring your video drivers are fully up to date and you're not running on ancient underpowered RAM constrained hardware or unsupported OSes.
"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

User avatar
LuftWafflePilot
Fanatic
Fanatic
Posts: 224
Joined: 2021-02-19, 20:46

Re: 2-3 second lag in response time

Unread post by LuftWafflePilot » 2021-12-08, 08:48

So this type of problem (although not as extreme as described in the OP) has been getting on my nerves lately pretty much 24/7. By lately I mean in high(er) number of weeks.
I have to restart PM several times a day because the slowdowns are just unbearable. Just typing this post I get random cursor lag of around one second.
I have no idea what the problem is, but it must be something outside of PM and on the general websites coding side or something, because even though I did write about exactly the same behaviour a few times in past, it was never this bad.
I just don't know.
Looks like the web is evolving in very unPM way and I am finding I have to use Firefox for more and more websites that just don't work in PM properly anymore. Previously it was just FB and Youtube due to the atrocious speed, and now I have a full bar of tabs there :(

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

Re: 2-3 second lag in response time

Unread post by moonbat » 2021-12-08, 11:41

LuftWafflePilot wrote:
2021-12-08, 08:48
and now I have a full bar of tabs there :(
So what are these sites? I still find PM runs fine on the sites I use frequently and FB/Youtube aren't among them. Did you even try to troubleshoot as suggested in my earlier comment?
"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

User avatar
LuftWafflePilot
Fanatic
Fanatic
Posts: 224
Joined: 2021-02-19, 20:46

Re: 2-3 second lag in response time

Unread post by LuftWafflePilot » 2021-12-08, 14:55

There's nothing to troubleshoot when sites are known to perform like shit in PM and virtually everyone agrees on that.
And it's not like I didn't try. Enabling and disabling Ublock, redoing all settings from scratch, etc. Nothing helps. I don't use many extensions and most of them can't even affect performance in any way. I'm sure I did try anyway in past. I just can't be arsed to experiment with what's clearly bad without any apparent reason.
And besides - I've been using more or less the same addons for years, so that cannot be the cause anyway.
Facebook, Youtube, Twitch, reddit just to name a few.
The rest simply doesn't work properly due to - presumably - being coded for Firefox/Edge.

Locked