Live data from Hacker News

Firefox fixes save gigabytes of memory on image-heavy pages

blog.mozilla.org

171–180 of 203 posts

Re: Firefox fixes save gigabytes of memory on image-heavy pages

#171
post #144

Earlier quoted context omitted.

> bookmarks always visible, View -> toolbars -> bookmarks toolbar (uncheck) > menu-bar takes up another bar of space by default View -> toolbars -> menu bar (uncheck)

But that means my bookmarks disappear completely, whereas in Chrome they are displayed in new tabs, which is far more useful behavior.

[deleted]

Re: Firefox fixes save gigabytes of memory on image-heavy pages

#172

Like many of the other Firefox memory changes, this one leaves me feeling a little ambiguous. On the one hand, obviously keeping memory usage down is good. On the other hand, waiting to decompress/decode images until they are visible to the user means that there are obviously going to be performance trade-offs (and also, obviously, design/engineering trade-offs). Speaking just from my personal usage: I don't think th…

Have you tried the new version? You should try it before you dismiss it due to theoretical concerns. As I wrote in the blog post, the time before the page displayed dropped from 5 seconds to 1 seconds. And scrolling performance is unaffected AFAIK; if you have evidence otherwise Timothy and I would love to hear about it.

Firstly... thanks! I love firefox, and appreciate any memory savings.

Did you do any tests for animation performance, and test that preloaders are not affected? Are these issues addressed?

Hardware accelerated decoding(like IE, and image viewers use) would help. Much modern hardware can do the whole decode-resize step in dedicated hardware.

For software only, an improvement is resizing in jpeg-space to the exact size required. It is much faster than decoding the entire jpeg (eg 5 megapixels 2MB jpeg, into 20MB of uncompressed image data) then only displaying it at 320x200 pixels(1MB at the 16bit needed for this YUV data). You can resize the smaller jpeg-space data, then not have to allocate that 20MB of data (perhaps never going back to the OS).

As well, some images compress very nicely with hardware texture compression (but many look awful). There are heuristics that can be used to decide the best type of texture to use based on the image data.

Why turn 6bit-16bit per pixel jpeg data into 32 bit per pixel data? It only takes more memory and is slower to draw. Surely jpeg usage is common enough to special case its handling?

Good luck!

Re: Firefox fixes save gigabytes of memory on image-heavy pages

#174
post #173

I switched to Chrome recently because Firefox was growing overnight to the point where it started thrashing and becoming unusable. I just checked and it says I already have the latest version. This recent change must not be the whole story.

The latest changes done as part of this are only present on Aurora (Firefox alpha) and the feature is turned off by default.

Also, I have my Firefox (Aurora again) running for over a week now on my dev machine with > 50 tabs open an I have had no issues with memory. I suppose there is some problem with one of your add-ons. Try creating a clean profile and see if it's any different.

Re: Firefox fixes save gigabytes of memory on image-heavy pages

#175
post #68

Earlier quoted context omitted.

Last I tried Firefox, pretty recently, it still needed to address some serious issues, when compared to Chrome: * Unresponsiveness due to one tab thrashing * Bad use of screen-space (bookmarks always visible, cannot disappear titlebar like in Chrome [there's only a Windows extension for that], menu-bar takes up another bar of space by default) * Launching firefox has stop-the-world behavior to check/update extensions…

Firefox's screen usage is easy to configure. Compare[1] my KDE-themed Firefox and Chrome, for example. [1]: http://jelv.is/browser-screen-usage.png Extensions require a restart to be installed, perhaps, but that doesn't seem to be a big issue: you only install any given extension once. If you want to install a bunch at the same time, you only need to restart once.

I see fonts for web browsing in linux are still horrible.

Re: Firefox fixes save gigabytes of memory on image-heavy pages

#176

I wish people would use regular 2d plots for 2d data. Other than that, great news!

Everyone's crapping on me for the choice of graph. I originally tried a 2d plot but the lines obscured each other. More importantly, it wasn't intended to be a rigorous data representation because the results vary significantly between runs. I was just trying to communicate the results in an approximate fashion; the improvements are dramatic enough that approximate is good enough, IMO. And in case anyone is thinking…

I would suggest something like this: http://imgur.com/QugrU9y (inaccurate numbers!)

Re: Firefox fixes save gigabytes of memory on image-heavy pages

#177
post #129

Earlier quoted context omitted.

Chrome became very resource hungry and poor at memory management recently. Sometimes I see half blank pages when scrolling which I've never seen before on the desktop.

The half-blank pages you're seeing is a feature that's recently been enabled. This is a case of latency improvement that visually appears to be worse. When rendering can't keep up with your rate of scrolling, Chrome will display the part that has been rendered so far and display a checkerboard pattern for the not yet rendered part. Previously, Chrome would just flip the display buffers less often if rendering can't k…

Oh, hooray, it's mobile Safari!

Re: Firefox fixes save gigabytes of memory on image-heavy pages

#178
post #20

I just compared it with Chrome using the example page mentioned in article: In Firefox Nightly at the initial page load it uses around 250 MB memory and with scrolling it stays around that. In Chrome (in Canary too) initial it uses around 300 MB but scrolling keeps filling the memory indefinitely (I stopped scrolling above 1.2GB)

Interestingly enough, I loaded the page in IE 11 (11.0.9600) and scrolled all the way to the bottom. It initially used around 160 MB, then reached 240 MB by the bottom of the page.

Chrome used around 2.5 GB on my machine.

Re: Firefox fixes save gigabytes of memory on image-heavy pages

#179
post #68
post #27

Earlier quoted context omitted.

Yea, I also noticed that, save for the pages with tons of images, firefox has actually been better than chrome in that respect for the last few releases. Now with this fix, I'm seriously thinking of jumping back. Then I'll finally have my sweet DownThemAll again. Many kudos to the firefox devs, performance and memory-usage is very important, and it seems they realized that before it was too late. Even with my 16GB I'…

Last I tried Firefox, pretty recently, it still needed to address some serious issues, when compared to Chrome: * Unresponsiveness due to one tab thrashing * Bad use of screen-space (bookmarks always visible, cannot disappear titlebar like in Chrome [there's only a Windows extension for that], menu-bar takes up another bar of space by default) * Launching firefox has stop-the-world behavior to check/update extensions…

Not to mention the hated non-resizable, piece-of-shit bookmarks dialog that hasn't been fixed year after year after year: https://bugzilla.mozilla.org/show_bug.cgi?id=418864

Re: Firefox fixes save gigabytes of memory on image-heavy pages

#180
post #106
post #36

Earlier quoted context omitted.

really? I have about 20 tabs open on Chrome now with no lag, with one tab open in Firefox my whole system grinds to a halt.

I am addicted to tabs and have 260 tabs (yes, I have a problem) open and running smoothly in Firefox. That was not possible in Chromium last time I used it. Firefox currently uses about 3GB memory, which means I have plenty of memory left on my computer. So I do not think memory usage in the general case is so bad for Firefox and neither is scalability or performance. The problem Firefox historically has had and stil…

My issue is the lack of a properly support x64 build of Firefox.

I hit the 3GB limit pretty much daily, FF crashes, I start it up again, back come my 200 tabs, thankfully not all loaded at once!

I'll admit I know the cause of the problem, Reddit Enhancement Suite, but I'd rather have FF crash daily than go without RES.

Post reply on HN