Performance optimizations?

Discussions about the development and maturation of the platform code (UXP).
Warning: may contain highly-technical topics.

Moderators: trava90, athenian200

User avatar
artics
New to the forum
New to the forum
Posts: 2
Joined: 2024-07-11, 08:49

Performance optimizations?

Unread post by artics » 2024-10-13, 12:30

I have zero knowledge of the Pale Moon source code so forgive me if I'm being ignorant.

Can anything be done to make Pale Moon feel snappier, more responsive or generally faster? Couldn't the UI be processed in a separate thread as the Javascript? To what extent does it utilize hardware acceleration? It's too easy for me to crash the entire browser when I'm messing with Javascript and accidentally start a non-terminating loop. The browser hangs for a few seconds when loading modern web pages like GitHub. And pages generally load slower than on other browsers.

I'd expect Pale Moon to be much faster since it's based on an older, less bloated version of Firefox.

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

Re: Performance optimizations?

Unread post by vannilla » 2024-10-13, 14:36

artics wrote:
2024-10-13, 12:30
I'd expect Pale Moon to be much faster since it's based on an older, less bloated version of Firefox.
This is, unfortunately, a false assumption based on the wrong premises.
A current-day web browser - anyone, be it Chrome, Firefox or Pale Moon - is conceptually made of two macro-components: the user interface is the "browser" itself, where you have buttons to control navigation, manage history, set bookmarks and so on.
The other component is the contents itself, which is what is being displayed and you mostly interact with. The wrong assumptions are here: the content being displayed is not just content anymore, it's an actual complex program like it is for any other application you might be running on your PC.
Since it's a full-fledged program, its actual performance does not lie only within the web browser, but in the program's code too and this is where the major issue lies: web browsers can only do so much to make slow programs performant enough for actual use; in fact, we're fast approaching the limit of what they can do at all and inevitably we'll reach a point where no more performance improvements can be found.
Chrome, and subsequently Firefox, took a particular approach to the inevitable performance wall: what if we turn the browser into an operative system and treat the contents as real separate processes like an OS would do? And that is Electrolysis, multi-process architecture, whatever you want to call it, that's now in use in those browsers.
Pale Moon took the "historical" (for a lack of a better word) approach and decided that a web browser is just that, a browser and not an operative system. UXP (which Pale Moon is built on) is already using multi-threading and many other techniques to improve performance to the limit and while it can most likely still be improved, what it shows you is nothing more than the hard truth: you are not using a slow web browser, but you are interacting with a very slow program given to you by the website you are visiting.

User avatar
frostknight
Lunatic
Lunatic
Posts: 399
Joined: 2022-08-10, 02:25

Re: Performance optimizations?

Unread post by frostknight » 2024-10-14, 10:07

vannilla wrote:
2024-10-13, 14:36
This is, unfortunately, a false assumption based on the wrong premises.
A current-day web browser - anyone, be it Chrome, Firefox or Pale Moon - is conceptually made of two macro-components: the user interface is the "browser" itself, where you have buttons to control navigation, manage history, set bookmarks and so on.
current firefox might be faster in booting, but I would wager that web surfing is probably at worst the same on both and at best faster on palemoon like web browsers.

I also wonder if like chrome, firefox is never really off and just lies in wait to be started. That's how it was on windows xp I recall and maybe newer too? Idk if this changed or not.

Nor do I know if linux has the same issues with chrome or if firefox does too. Many unanswered questions here heh.
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Say NO to Fascism and Corporatism as much as possible!
Also, Peace Be With us All!

User avatar
Massacre
Fanatic
Fanatic
Posts: 119
Joined: 2020-05-01, 13:16
Contact:

Re: Performance optimizations?

Unread post by Massacre » 2024-10-14, 23:45

The actual problem is Javascript and Chromium-exclusive features. The only way to make it faster is to optimize/rewrite that Javascript engine, I guess...

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

Re: Performance optimizations?

Unread post by moonbat » 2024-10-15, 00:03

frostknight wrote:
2024-10-14, 10:07
That's how it was on windows xp I recall
It was not, unless you were using XP beyond 2010. Firefox in its first decade, going from version 0.1 to 4 was a very different browser under a very different Mozilla compared to what happened to both later.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
KDE Neon on a Slimbook Excalibur (Ryzen 7 8845HS, 64 GB RAM)
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
suzyne
Astronaut
Astronaut
Posts: 611
Joined: 2023-06-28, 22:43
Location: Australia

Re: Performance optimizations?

Unread post by suzyne » 2024-10-15, 06:33

Massacre wrote:
2024-10-14, 23:45
The actual problem is Javascript and Chromium-exclusive features. The only way to make it faster is to optimize/rewrite that Javascript engine, I guess...
I think this is the best answer, so far. I came to Pale Moon after using a Chromium-based browser and like @artics says, Pale Moon can sometimes feel sluggish in comparison. The technicalities or why don't change the fact that Google had the resources to design a browser that manages to cope better with web pages that are loaded up with colossal and extravagant amounts of JavaScript.
Laptop 1: Windows 10 64-bit, i7 @ 2.80GHz, 16GB, NVIDIA GeForce MX450.
Laptop 2: Windows 10 32-bit, Atom Z3735F @ 1.33GHz, 2GB, Intel HD Graphics.
Laptop 3: Linux Mint 20.3 64-bit, i5 @ 2.5GHz, 8GB, Intel HD Graphics 620.

User avatar
frostknight
Lunatic
Lunatic
Posts: 399
Joined: 2022-08-10, 02:25

Re: Performance optimizations?

Unread post by frostknight » 2024-10-15, 07:27

moonbat wrote:
2024-10-15, 00:03
It was not, unless you were using XP beyond 2010. Firefox in its first decade, going from version 0.1 to 4 was a very different browser under a very different Mozilla compared to what happened to both later.
Maybe that was just chrome then. Unless you misunderstood me, I did mean firefox once it switched to webextensions might have had the same problem.

Although, at the time, I might have mixed my wires (thoughts) up and wrote stuff down wrong here.

Old firefox with XUL however never had that problem though yes.

Oh btw, I actually remembered something, yes... it wasn't XP, it was probably windows 8
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Say NO to Fascism and Corporatism as much as possible!
Also, Peace Be With us All!

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

Re: Performance optimizations?

Unread post by moonbat » 2024-10-15, 08:43

frostknight wrote:
2024-10-15, 07:27
Oh btw, I actually remembered something, yes... it wasn't XP, it was probably windows 8
Yes, given that XP was released in 2001 when Firefox went by the name of Phoenix and was in limited alpha. XP ceased being the current version after Vista was released around 2006-07 :)
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
KDE Neon on a Slimbook Excalibur (Ryzen 7 8845HS, 64 GB RAM)
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

BenFenner
Astronaut
Astronaut
Posts: 651
Joined: 2015-06-01, 12:52
Location: US Southeast

Re: Performance optimizations?

Unread post by BenFenner » 2024-10-15, 16:06

Don't forget a lot of sites feed Pale Moon old, unsupported versions of their JavaScript as a fallback (if they do anything useful at all) which would run horribly on any modern browser, Chrome included.

When web sites detect Pale Moon properly, and feed it the newer, maintained stuff (assuming it all works in Pale Moon) then things run just as fast as in any other modern browser.

User avatar
Massacre
Fanatic
Fanatic
Posts: 119
Joined: 2020-05-01, 13:16
Contact:

Re: Performance optimizations?

Unread post by Massacre » 2024-10-16, 09:03

BenFenner wrote:
2024-10-15, 16:06
Don't forget a lot of sites feed Pale Moon old, unsupported versions of their JavaScript as a fallback (if they do anything useful at all) which would run horribly on any modern browser, Chrome included.
Actually, they can feed some emulation code (polyfill?) of new features, this one could be very slow.

User avatar
UCyborg
Lunatic
Lunatic
Posts: 260
Joined: 2019-01-10, 09:37
Location: Slovenia

Re: Performance optimizations?

Unread post by UCyborg » 2024-10-17, 19:50

Projects that port old school game engines to web browser environment are pretty neutral on features used. They tend to run best in Chromium. One of the older projects I know is QuakeJS, port of ioquake3 engine using data of demo version of Quake III.

My experience is that if it's an app of sufficient complexity, it will be less responsive on Pale Moon. That goes for non-gaming applications as well, and again, you don't need to use Chromium specific features or even polyfills of some fancy features to notice it. And I don't think muti-process vs single-process is as important. I've seen other browsers that are more responsive than Pale Moon when constrained to a single process. One is SeaMonkey, another is Mypal 68. The latter is port of newer Firefox versions to Windows XP, still supports single-process, it's some sort of conglomeration of Firefox 68 and some newer versions, not sure which Firefox version it's supposed to be closest to these days. Both are a bit behind on certain web features.

I use 10 years old low-end smartphone, a Sony Xperia E3, running a port of LineageOS 14.1 based on Android 7.1.2. It has quad core ARMv7 processor clocked at 1,2 GHz and 1 GB of RAM. The browser I use on it is called Via, it uses Chromium WebView 119, final version before Google dropped Android 7. WebView in that environment is single-process by default. All "real" browsers hog more RAM, the OS with (older and lighter) Google Play Services already take good half of it, a single tab in other browsers is often enough for the OS to terminate home/launcher application. Firefox tends to be both slower and more RAM hungry.

But on PCs, with reasonable workloads, I think resource consumption of Chromium browsers is overblown by some people. Sure it's a bit higher normally, but nothing dramatic IMO. And there are sites that will make Pale Moon's RAM usage explode while staying normal on today's Gecko / Blink.

User avatar
UCyborg
Lunatic
Lunatic
Posts: 260
Joined: 2019-01-10, 09:37
Location: Slovenia

Re: Performance optimizations?

Unread post by UCyborg » 2024-10-18, 08:11

While it's not super slow on decent sites on decent enough machines, I can understand why this topic keeps coming up. I imagine some people are looking for Chromium with Pale Moon's GUI and extensions and there's nothing exactly like that on the market.

A browser that would run web extensions + XUL extensions and ran all JS web sites throw at it smoothly would be awesome IMO. But it's a fantasy.

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

Re: Performance optimizations?

Unread post by Moonchild » 2024-10-18, 08:34

UCyborg wrote:
2024-10-17, 19:50
I think resource consumption of Chromium browsers is overblown by some people. Sure it's a bit higher normally, but nothing dramatic IMO.
I have Edge open with a good handful of tabs. most of those tabs are "sleeping" according to Edge (since it's been sitting idle overnight), but you decide whether this is "dramatic" or not. I think it is. 28 processes; you can add up all the memory use yourself as I don't feel like it ;P.
Attachments
edge1.png
{{This headspace for lease}}
"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
frostknight
Lunatic
Lunatic
Posts: 399
Joined: 2022-08-10, 02:25

Re: Performance optimizations?

Unread post by frostknight » 2024-10-18, 09:26

Moonchild wrote:
2024-10-18, 08:34
I have Edge open with a good handful of tabs. most of those tabs are "sleeping" according to Edge (since it's been sitting idle overnight), but you decide whether this is "dramatic" or not. I think it is. 28 processes; you can add up all the memory use yourself as I don't feel like it ;P.
I am not patient enough to calculate all of that, but 100M is how much I use for version of palemoon, I have 8GB of ram on this computer.

This being said, you have like 3 different measurements of like 400M+

That is crazy

On closer inspection, I noticed that you might be using 2000MB+

every 1000K is a MB I am aware.

And since you have like 12+ different listings of 100000K and in some cases more like 400+, yeah... that's microsoft doing what it does best, wasting resources.

EDIT: I actually use 200MB for this I just checked with htop its a ncurses way to measure cpu and memory usage.

but even still, 1 tenth of the amount your browser is using. Although I did have one process opened, but even still, yours were sleeping.

madness...
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Say NO to Fascism and Corporatism as much as possible!
Also, Peace Be With us All!

User avatar
satrow
Forum staff
Forum staff
Posts: 1907
Joined: 2011-09-08, 11:27

Re: Performance optimizations?

Unread post by satrow » 2024-10-18, 10:09

Moonchild wrote:
2024-10-18, 08:34
you can add up all the memory use yourself as I don't feel like it ;P.
For anyone that might like an auto-add option for multiple processes of the same name, Meminfo might be useful; https://www.carthagosoft.net/MemInfo.php it uses ~30Mb x64.
meminfo.png

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

Re: Performance optimizations?

Unread post by Moonchild » 2024-10-18, 10:50

frostknight wrote:
2024-10-18, 09:26
that's microsoft doing what it does best, wasting resources.
Don't blame Microsoft here. This is Chrome under the hood doing the wasting.
Just the memory isn't the full picture either. All of those processes are communicating with each other, too, causing kernel strain (that isn't necessarily reflected in CPU%)
{{This headspace for lease}}
"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
suzyne
Astronaut
Astronaut
Posts: 611
Joined: 2023-06-28, 22:43
Location: Australia

Re: Performance optimizations?

Unread post by suzyne » 2024-10-18, 10:56

I am wary of Task Manager results that compare the amount of memory used by a browser for a "handful of tabs" because the results are strongly affected by what those open tabs are? For example, here are the results for Edge and Pale Moon with only ONE open tab that is the IDENTICAL URL for both browsers.

Image

Hmmmmm, neither browser is looking that good with a single tab is it?

In case you are curious, the URL is https://screenrant.com/best-overlooked-underrated-android-apps/ and the page has been scrolled to the bottom to ensure that all content has been loaded.

My point is that which browser requires the least memory is so dependent on the sites people like to visit that anybody making a claim about which is best can really only apply to their specific use case, which most likely is not the same as mine!
Laptop 1: Windows 10 64-bit, i7 @ 2.80GHz, 16GB, NVIDIA GeForce MX450.
Laptop 2: Windows 10 32-bit, Atom Z3735F @ 1.33GHz, 2GB, Intel HD Graphics.
Laptop 3: Linux Mint 20.3 64-bit, i5 @ 2.5GHz, 8GB, Intel HD Graphics 620.

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

Re: Performance optimizations?

Unread post by Moonchild » 2024-10-18, 11:41

Of course it heavily depends on which sites you visit. I never claimed otherwise. My overall impression with a varied number of tabs though is that Edge is using a shit ton of processes and memory; more than I would reasonably expect from what's opened. I don't imply my casual observation (in process explorer because I know the "new" windows task manager is very inaccurate...) is in any way quantitative. this is a qualitative observation.
{{This headspace for lease}}
"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
moonbat
Knows the dark side
Knows the dark side
Posts: 5387
Joined: 2015-12-09, 15:45
Contact:

Re: Performance optimizations?

Unread post by moonbat » 2024-10-18, 13:07

Off-topic:
Just wanted to point out that the article is over a year old, and the author of the first app mentioned, Barinsta (an Instagram alternative), has long since pulled it from the net after receiving legal threats from Meta.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
KDE Neon on a Slimbook Excalibur (Ryzen 7 8845HS, 64 GB RAM)
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
frostknight
Lunatic
Lunatic
Posts: 399
Joined: 2022-08-10, 02:25

Re: Performance optimizations?

Unread post by frostknight » 2024-10-18, 13:26

Moonchild wrote:
2024-10-18, 10:50
Don't blame Microsoft here. This is Chrome under the hood doing the wasting.
Just the memory isn't the full picture either.
You know, you have a point. Google also wastes a hell of a lot memory. Sometimes more than microsoft.

Chrome is a memory waster and since Edge is based on chrome...

yeah.
Freedom is never more than one generation away from extinction. Feelings are not facts
If you wish to be humbled, try to exalt yourself long term If you wish to be exalted, try to humble yourself long term
Favourite operating systems: Hyperbola Devuan OpenBSD
Say NO to Fascism and Corporatism as much as possible!
Also, Peace Be With us All!

Post Reply