Why is PM so much slower than Firefox in loading websites?

General project discussion.
Use this as a last resort if your topic does not fit in any of the other boards but it still on-topic.
Forum rules
This General Discussion board is meant for topics that are still relevant to Pale Moon, web browsers, browser tech, UXP applications, and related, but don't have a more fitting board available.

Please stick to the relevance of this forum here, which focuses on everything around the Pale Moon project and its user community. "Random" subjects don't belong here, and should be posted in the Off-Topic board.
BenFenner
Astronaut
Astronaut
Posts: 588
Joined: 2015-06-01, 12:52
Location: US Southeast

Re: Why is PM so much slower than Firefox in loading websites?

Unread post by BenFenner » 2023-03-08, 16:45

Moonchild wrote:
2023-03-07, 09:38
Actually, Pale Moon is not "much slower than firefox" in how it operates.
...
Even just-in-time compilation is broadly the same making Javascript execution near-native code speed.
...
So where does this perceived slowness come from then? Well, the websites that are problematic do not have any meaningful content except what their scripting barfs out on the screen, so everything ends up being bottlenecked into content-translating scripting. Once again it's not that our scripting engine is slow; far from it. But what happens more often than not is that the scripting checks for specific native features and if even one is missing it will go into "fallback mode" (if they even have one) which will then assume nothing they want is supported and emulate it (through replacement, unoptimized javascript code).
This is a deeper understanding of the problem than I had, and explains the striking difference in speed between Pale Moon and Firefox that I've noticed on many JS-heavy sites, especially Facebook and similar. I'd thought it was the JS processing engine optimization, but I see now that it is much more likely poorly optimized fall-back code, poly-fills, and similar alternative solutions provided by the web sites that end up causing the problem.

This is actually great news, as things should just improve "magically" as Pale Moon checks those compatibility boxes and one day Facebook (and similar) might see all of the native features they are expecting and, poof, it'll just be unrecognizably fast.

(I had a sneaking feeling Pale Moon had a fork-point after the major JS improvements in Firefox ESR, but was convinced otherwise by my previous theory. I see now my theory was wrong and I'm happy to know the proper reasoning now. Thank you MC!)

User avatar
Mæstro
Lunatic
Lunatic
Posts: 459
Joined: 2019-08-13, 00:30
Location: Casumia

Re: Why is PM so much slower than Firefox in loading websites?

Unread post by Mæstro » 2023-03-08, 22:14

BenFenner wrote:
2023-03-08, 16:45
I had a sneaking feeling Pale Moon had a fork-point after the major JS improvements in Firefox ESR
While Pale Moon had begun development with Firefox 4 and had begun to diverge with v24, UXP had been forked from Firefox 52.
Browser: Pale Moon (Pusser’s repository for Debian)
Operating System: Linux Mint Debian Edition 4 (amd64)
※Receiving Debian 10 LTS security upgrades
Hardware: HP Pavilion DV6-7010 (1400 MHz, 6 GB)
Formerly user TheRealMaestro: æsc is the best letter.

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

Re: Why is PM so much slower than Firefox in loading websites?

Unread post by moonbat » 2023-03-09, 00:02

Mæstro wrote:
2023-03-08, 22:14
UXP had been forked from Firefox 52
That was after it was decided to develop the underlying platform instead of only focusing on the browser part, it was forked first from I think 38 and reforked from 52 as the last Firefox build that still retained critical components of the original XUL/XPCOM and other features. So thanks to doing this we have a UXP that can support other applications like Fossamail & Interlink for a time, Basilisk and now Epyrus.
"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

Locked