Memory management in PM 7.0 x64

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

Memory management in PM 7.0 x64

Post by neomanu » 2011-10-03, 01:46

The memory usage of the latest version of the 64-bit edition of this browser seems to be as high as the previous versions, while that of FF is much lower. Was expecting the same in PM but there is hardly any improvement in memory usage.

User avatar
Moonchild
Project founder
Project founder
Posts: 39486
Joined: 2011-08-28, 17:27
Location: Sweden

Re: Memory management in PM 7.0 x64

Post by Moonchild » 2011-10-03, 07:26

Memory use in Pale Moon x64 is of secondary importance, as it is assumed that x64 users will have plenty to spare. As stated, Pale Moon doesn't necessarily aim to be a lightweight browser. In addition, VS2010 that is currently used to compile it doesn't allow for the same kind of run-time library optimizations as what is done in the 32-bit versions, and that is where most of the memory gains come from. Also, you cannot compare 32-bit Firefox with 64-bit Pale Moon, that's apples and oranges; 64-bit programs inherently use more memory.

The x64 version also still needs work regarding performance and resource use but with Mozilla's rapid release schedule work on it is slow.
"Praise from a narcissistic person is always a poison dart. They don't share the stage, so discernment matters." - Dr. Ramani
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

fxfuji

Re: Memory management in PM 7.0 x64

Post by fxfuji » 2011-11-20, 05:16

Pale Moon doesn't necessarily aim to be a lightweight browser.
This surprises me. My understanding was that PM is intended to be more efficient w.r.t. system resources than FF, so I assumed that its memory 'footprint' would be smaller (because the 'fat' is removed from FF). If PM weren't 'lighter' than FF -- and thus far in my limited experience with it, it IS -- I wouldn't have much motivation to choose it over FF.

As far as x64 is concerned, I just did a quick check comparing portable PM 8.0 (32 bit) and portable PM 8.0-x64. The 64-bit version used about 50% more memory than the 32-bit one (same 150+ open tabs, Memory Fox off). But the really interesting thing is that the Memory Fox extension seems to have no effect whatsoever on the -x64 version's memory usage; the peak memory usage of the 32-bit version is reduced by roughly 50% with Memory Fox.

So, for my situation (lots of open tabs, other memory-hungry programs running on 64-bit Windows 7 with only 4 GB of RAM), it really doesn't make much sense for me to use the 64-bit version. I'm not sure what advantages it brings that offset its memory footprint disadvantage.

Even worse (but a bit off-topic), portable PM 8.0 seems to be more memory-hungry than portable PM 6.0 -- I'm really disappointed by this, because I thought that PM/FF 7.x and 8.x were supposed to be better w.r.t. memory management than PM/FF 6.x

Nonetheless, I'm still a big PM fan... though I may stick with portable 6.x for a while because of its lower memory footprint.

User avatar
Moonchild
Project founder
Project founder
Posts: 39486
Joined: 2011-08-28, 17:27
Location: Sweden

Re: Memory management in PM 7.0 x64

Post by Moonchild » 2011-11-20, 08:34

Efficiency doesn't always mean code or resource use is smaller. Quite often, it is, and I try to keep resource use low, but the main focus is to make the browsing, i.e. the task the application is made for, as efficient as possible. A smaller memory footprint is a side-effect and it is inherent to removing some functions from the browser, although this removal has been prompted not for RAM usage, but for not unnecessarily wasting processor time or hooking into the Windows API.

In my understanding "lightweight" means that sacrifices are made as regards functionality or speed to push resource use as low as possible. Pale Moon doesn't make compromises that way.

"Memoryfox" doesn't actually manage the memory of the browser; only the browser can do that - it merely flushes page-able portions of the browser out using Windows O.S. calls - I'm not surprised that it doesn't work for x64, since it'd probably need different calls to flush for a native 64-bit application than for a 32-bit application. It also means that you will be putting heavier load on the O.S. since it will be constantly swapping memory blocks out and back in to keep "active" memory usage low. The actual usability of Memoryfox is therefore debatable

Something that may make a big difference if you use a large number of tabs in v8 is ticking the box in options -> general to not load tabs until selected. I doubt you'll be actively using all those tabs every session. That will certainly reduce your memory footprint.
"Praise from a narcissistic person is always a poison dart. They don't share the stage, so discernment matters." - Dr. Ramani
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

fxfuji

Re: Memory management in PM 7.0 x64

Post by fxfuji » 2011-11-28, 18:48

Moonchild wrote:Efficiency doesn't always mean code or resource use is smaller. Quite often, it is, and I try to keep resource use low, but the main focus is to make the browsing, i.e. the task the application is made for, as efficient as possible. A smaller memory footprint is a side-effect and it is inherent to removing some functions from the browser, although this removal has been prompted not for RAM usage, but for not unnecessarily wasting processor time or hooking into the Windows API.

In my understanding "lightweight" means that sacrifices are made as regards functionality or speed to push resource use as low as possible. Pale Moon doesn't make compromises that way.
OK, that makes sense. I've been using memory footprint as a kind of a proxy for whether a browser is 'efficient' or not -- because I've noticed that my system slows to a crawl when memory-hungry applications use up available RAM -- but I agree that the footprint is a by-product of code efficiency. After all, a browser that uses little memory but is slow to respond is not desirable... so I'm glad that PM doesn't compromise features or performance in order to minimize resource usage.

The main thing I'm looking for is a browser (and OS) that responds quickly (if not immediately) to clicks and other user input... even if I have a lot of tabs open in the background.

Moonchild wrote:"Memoryfox" doesn't actually manage the memory of the browser; only the browser can do that - it merely flushes page-able portions of the browser out using Windows O.S. calls - I'm not surprised that it doesn't work for x64, since it'd probably need different calls to flush for a native 64-bit application than for a 32-bit application. It also means that you will be putting heavier load on the O.S. since it will be constantly swapping memory blocks out and back in to keep "active" memory usage low. The actual usability of Memoryfox is therefore debatable
I haven't noticed higher processor utilization (CPU %) with MemoryFox active vs. disabled, but perhaps I'm misinterpreting what "a heavier load on the O.S." means?
Moonchild wrote:Something that may make a big difference if you use a large number of tabs in v8 is ticking the box in options -> general to not load tabs until selected. I doubt you'll be actively using all those tabs every session. That will certainly reduce your memory footprint.
Thank you for the tip! I guess that's a good reason to switch to v8. :)