Jump to content
nsane.forums
Sign in to follow this  
tezza

Firefox 24/26 ships with serious memory consumption improvements on image-heavy pages

Recommended Posts

tezza

Here is a test. Open your Task Manager on your system and then this image-heavy page in the Firefox web browser. Is the memory count going up like crazy on that page and staying there? Then you are running Firefox 23 or older on your system.

Now open that very same page in Firefox 24, and then in Firefox 26. You will notice that the page is not nearly making a dent in Firefox 26 thanks to memory consumption improvements that Mozilla implemented in this version of the browser. In Firefox 24, you will notice that the consumption drops after the first peak.

First improvements landed in Firefox 24, but the real deal ships with Firefox 26. On my test system, I opened the page in Firefox 26 and Firefox 23, and compared the memory consumption after the page had been loaded.

Note that I had about 20 tabs open in Firefox 26, and only one in Firefox 23.
Firefox image-heavy page optimizations

firefox-image-optimization.png

Firefox 23: 1809956 K
Firefox 26: 372592 K

So why the huge difference in memory consumption?

Firefox 23 and older versions of the browser decode every image found on the page and retain the data for as long as the page is in the foreground.

The memory fix introduced in Firefox 24 keeps only the visible images in memory. While it will still decode all images on the page, you will notice that memory consumption drops shortly thereafter due to this.

The Firefox 26 improvement takes care of the initial burst in memory usage. Instead of decoding all images on the page, it only takes care of the visible images so that only those are decoded on page load. This not only means that the memory consumption stays low and won't peak on page load, but also that the page loading times of image heavy pages are improved significantly.

Since Firefox does not have to decode all images on page load, the page itself loads a lot quicker in the browser.

firefox-memory-optimization-660x453.png

According to Mozilla, these improvements do not affect the scrolling performance of Firefox. While it is too early to say if this is really the case, it is likely that most users won't notice a difference in scrolling behavior on image-heavy pages.

The feature introduced in Firefox 24 and 26 is similar to a technology called lazy loading which is used by webmasters to speed up the loading of their sites. Instead of loading all images on user connection, those visible are loaded with priority, with the remaining ones only loaded when they are needed (in this case when the user scrolls down so that they become visible on the page).

Other browsers

Wonder how other browsers are handling that page? Google Chrome's memory consumption does not increase by a lot when the page is loaded. You will see a peak in memory and some cpu utilization though during the decoding, but the process responsible for the page stays well within memory limits (jumps to about 200K)

The new Opera browser handles the page exactly as Chrome does.

Microsoft's Internet Explorer 11 has no issues loading the page, and memory consumption won't jump by much (to about 160K.

Closing Words

If you hang out on image-heavy pages, web forums for instance, a lot, you will certainly benefit from the improvements made. That's great for users who use machines with little RAM, but should also have an impact on other users of the browser.

With all other browsers handling memory consumption in a better fashion on image-heavy pages, it was time that Mozilla reacted and modified how Firefox handles those pages. The engineers responsible did a fantastic job and eliminated the issue in Firefox.

http://www.ghacks.net/2013/10/01/firefox-24-will-ship-serious-memory-consumption-improvements-image-heavy-pages/

Share this post


Link to post
Share on other sites
shorty6100

I assume the same will be said of Pale Moon/Waterfox when their additions are updated. It could be my imagination, but each release of the previous browsers, of late, load much slower.

Edited by shorty6100

Share this post


Link to post
Share on other sites
NightWalker

Firefox doesnt feel smooth as Chrome in my machine, even Internet Explorer seems better, I really dont know why :unsure:

Share this post


Link to post
Share on other sites
DKT27

Firefox doesnt feel smooth as Chrome in my machine, even Internet Explorer seems better, I really dont know why :unsure:

This has been a case from two years now. Nothing new. Not everyone prefers Firefox for it's speed.

Share this post


Link to post
Share on other sites
bsvols

I assume the same will be said of Pale Moon/Waterfox when their additions are updated. It could be my imagination, but each release of the previous browsers, of late, load much slower.

It isn't your imagination. I have noticed a major slow-down in palemoon load times for a while now (seems like for two or three months, but it may be longer - not sure in which version it began). Palemoon (x64) used take about half as long on initiall load as Firefox (x32), but lately it has slowed to the point that it takes around 50% LONGER than firefox on first start-up. Since Palemoon is "optimized" for speed by removing a lot of the less freqently used code, like support for Windows 98, etc., that slow-down is surprising and a little disappointing to me. I used to prefer it over Firefox by a large margin ( I lke the other advantages of using 64 bit, as well as the extra speed that I got from Palemoon). While I still like Palemoon, the slow load times, as well as some loss in it's overall performance advantage over Firefox, make it a fair amount less desirable than it once was. Hopefully, they will get it back on track soon. I also find Internet Explorer and Chrome to be faster and perhaps more "smooth", but with Chrome, I know I have absolutely NO chance for privacy, and in Internet Explorer, I just can't find a way to handle some downloads or passwords that satisfies me. Guess I'm a little too picky about some things, sometimes.

Edited by bsvols

Share this post


Link to post
Share on other sites
NightWalker

Firefox doesnt feel smooth as Chrome in my machine, even Internet Explorer seems better, I really dont know why :unsure:

This has been a case from two years now. Nothing new. Not everyone prefers Firefox for it's speed.

It isnt about page loading speed or startup time, these for me are fine, it simple feels like something is holding back the performance.

I dont know how to put this in words, but it is like playing some heavy game without V-Sync (like Rage without updates on Radeon)

I installed SmoothWheel extension and It seems to be a little better ...

Ps: Pardon me for some grammar erros, I am not a native english speaker and it is time to go to bed ^_^

Share this post


Link to post
Share on other sites
DKT27

It isnt about page loading speed or startup time, these for me are fine, it simple feels like something is holding back the performance.

I dont know how to put this in words, but it is like playing some heavy game without V-Sync (like Rage without updates on Radeon)

I installed SmoothWheel extension and It seems to be a little better ...

Ps: Pardon me for some grammar erros, I am not a native english speaker and it is time to go to bed ^_^

if you are referring to scroll speed, Webkit / Blink always had faster scrolling speed, and with IE10, IE has faster scrolling too.

For Firefox, try this trick.

Share this post


Link to post
Share on other sites
Ryrynz

I assume the same will be said of Pale Moon/Waterfox when their additions are updated. It could be my imagination, but each release of the previous browsers, of late, load much slower.

It isn't your imagination. I have noticed a major slow-down in palemoon load times for a while now (seems like for two or three months, but it may be longer - not sure in which version it began). Palemoon (x64) used take about half as long on initiall load as Firefox (x32), but lately it has slowed to the point that it takes around 50% LONGER than firefox on first start-up. Since Palemoon is "optimized" for speed by removing a lot of the less freqently used code, like support for Windows 98, etc., that slow-down is surprising and a little disappointing to me. I used to prefer it over Firefox by a large margin ( I lke the other advantages of using 64 bit, as well as the extra speed that I got from Palemoon). While I still like Palemoon, the slow load times, as well as some loss in it's overall performance advantage over Firefox, make it a fair amount less desirable than it once was. Hopefully, they will get it back on track soon. I also find Internet Explorer and Chrome to be faster and perhaps more "smooth", but with Chrome, I know I have absolutely NO chance for privacy, and in Internet Explorer, I just can't find a way to handle some downloads or passwords that satisfies me. Guess I'm a little too picky about some things, sometimes.

You could just upgrade to an SSD.. On a clean profile Firefox starts in about a second for me. You might also want to look at just creating a new profile..

Share this post


Link to post
Share on other sites
NightWalker

It isnt about page loading speed or startup time, these for me are fine, it simple feels like something is holding back the performance.

I dont know how to put this in words, but it is like playing some heavy game without V-Sync (like Rage without updates on Radeon)

I installed SmoothWheel extension and It seems to be a little better ...

Ps: Pardon me for some grammar erros, I am not a native english speaker and it is time to go to bed ^_^

if you are referring to scroll speed, Webkit / Blink always had faster scrolling speed, and with IE10, IE has faster scrolling too.

For Firefox, try this trick.

Thanks, much better now

Share this post


Link to post
Share on other sites
GPSBaltic

I got Chrome over 2GB with windows XP. Something more 25 tabs open. In need least 32GB RAM to use Chrome.

Edited by GPSBaltic

Share this post


Link to post
Share on other sites
Archaven

I have no idea why.. my FF keep crashing lately. It's getting very annoying. I have to forced to use Chrome now. Problem is.. i have no idea why streaming on youtube 1080p will stop (slow buffering) where as i have no such problem with FF. Weird just weird.

Share this post


Link to post
Share on other sites
demoneye

I got Chrome over 2GB with windows XP. Something more 25 tabs open. In need least 32GB RAM to use Chrome.

try opera 16/17/18 its uses MUCH less memory for same tabs than google (gay) chrome :D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×