Strange inconsistent page load times on apt Firefox 83 Kubuntu 20.04

[I also posted this on the Firefox and linuxquestions subreddit but I’m hoping to find more people here who may be able to help, its been awhile and I haven’t received anything]

I recently switched from Mint 20 to Kubuntu 20.04 LTS on my main desktop (all Ubuntu-based 64 bit kernel 5.4.0 distros), which is a Dell Precision 5820 with an 8 core Xeon, 32gb ram, SSD, and a radeon graphics card (so a very powerful machine that should handle web browsing without any issues). However, one thing I noticed while making the switch was that for some reason Firefox seemed slower on a brand new clean install of Kubuntu than it did on Mint with the exact same set of hardware.

On Mint, pages loaded practically instantly instantly like they should, however on Kubuntu sometimes it takes more than 4 seconds (timed with a stopwatch) to load GOOGLE. But the strange thing is it doesn’t happen all the time, and it doesn’t seem to matter what website or how many tabs are open or anything like that. The only pattern I have found is that if I have a few tabs open and I use one for awhile, I open a new tab and go to google or any other website, it loads pretty quickly. However even a few seconds later if I open another new tab and go to another website, its incredibly slow. I can then repeat this behavior again with that new tab I just created and get the same result. I tried playing around with some settings like DNS over HTTPS and the performance settings but nothing seems to make a difference.

All of that was just the normal firefox release that comes on the ubuntu repos. However, when I tried the snap version of firefox 83 tab loading performance was about what it should be (besides the insane program loading times because snaps are dumb). Even though the snap version seems to work correctly, I still don’t really like snaps and would prefer the standered repo release.

Some other details: The slowness was an issue even before any settings where changed from default on the OS and firefox, so I don’t think any additional programs or tweaks I have made are the cause. When the tab decides to load slowly, the tab title says “New Tab” for most of the time it takes to load the tab, so does that mean its taking awhile to resolve the domain from the DNS server? (thats why I was playing around with DoH, but it didn’t seem to make a difference) I’m also not sure if its an issue with the OS at all because the snap version seems to work fine. Also, I would go back to Mint and try again to double check my findings, however this being my main computer I can’t really do that right now, and I feel like running it off the live USB would add to many differences to make it a “controlled” test. I also don’t think I have any issues loading pages by clicking links in webpages in tabs that already exist even if they go to an entirely different website.

I’m really not sure what to try at this point, are there any Linux guys here that could point me in the right direction? I’m also not sure how to access any relevant diagnostic data that I can post here, but if anyone knows of any that would be useful please let me know, I appreciate the help in advance!

EDIT: Also worth noting I an connected to my router with Ethernet and have a good network connections, other internet dependent apps work fine.

Maybe you could try a live media of Ubuntu 20.04.
And compare load times then on the FF83 browser.

My experience is that Firefox generally starts significantly slower on the kde desktop,
then on Gnome based desktops like Cinnamon, Budgie, XFCE or Mate.
But if that is also affecting page loading times significantly,
is something that i haven´t really noticed.
Because i don´t use KDE on a daily base.

Also on a side note, you could also try Manjaro 20.2 KDE.
Just as a reference.
Maybe it could be just Kubuntu specific.

That sounds like the snap package of Firefox to me. Snaps take FOREVER to load, but the one that ships with kubuntu is just the normal apt version like you would find in every other ubuntu based distro. The apt version starts up pretty quickly, but in my case has the weird issues I detailed above, while the snap version doesn’t have these issues in my case.

I’ll give the live usb version a try and report back. Thanks for the suggestion!

Yeah Ubuntu 20.04 itself is using snaps.
Manjaro not, so that might be worth comparing.

Just finished testing. I first tried it with the default older packages that come with the iso image (came with firefox 79), and things seemed much faster. Not as fast as my mint install or my windows machine, but the live usb probably slows things down and it was still a significant improvement from my kubuntu install. I then ran sudo apt upgrade to update everything including firefox to latest and I got the same speeds as with the older packages. So in short: the live usb gave me expected performance that was faster than my full install on both latest and older versions of software. Any idea what I should try next? I gotta go to sleep so I’ll check back here tomorrow.

This was tested with just Ubuntu? or Kubuntu?

Just kubuntu.