Live data from Hacker News

Firefox fixes save gigabytes of memory on image-heavy pages

blog.mozilla.org

81–90 of 203 posts

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

#81
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'…

isn't 16GB enough to run an extra VM for dev? also, try docker.

Not when most of that 16GB is in use. At the moment, chrome is using up 3.4GB. Yea, I have a lot of tabs open. Yes, I should work on that. Yes, I'd also like being able to open that many tabs and have my browser perhaps release some of that memory and just reclaim it when I open the tab for reading again.

Docker is real nice, although I might go for pure LXC the nex time I build something. But I'm developing on OSX (as many of us, I believe). So _not_ running a VM is not really possible here. I deploy on Linux, and like to have my environment very consistent, hence the VM. Granted, with Docker/LXC I could probably get by with just one VM and a lot of little apps running side-by-side, but that's not how my current setup and projects work, yet.

At any rate, less memory used by browser is more memory for me, to use any way I want.

I already love the firefox behaviour that when it restores your tabs, it doesn't actually load them until you click on them. Awesome startup speed improvement.

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

#82

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…

> All in all, it seems (from a not-particularly-in-touch outsider perspective) as if Mozilla went from being totally dismissive of memory complaints to being hyper-responsive to memory complaints with no (publicly stated) rationale behind the change.

I suspect that being a company that wants to have a unified code base for their browser and that is now newly pushing a browser-centric OS for smartphones may explain this, at least in part.

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

#83

Earlier quoted context omitted.

If image decoding is asynchronous (don't know - guessing it is already?) and you decode them when they get near to the viewport and not just when they become visible, then it should always be decoded by the time you scroll to it and yet never jank the page. Scrolling a long way really fast probably means there's a small delay while it decodes images, but surely that's worth it to save gigabytes of memory?

> but surely that's worth it to save gigabytes of memory I'm not sure _save_ is the right word here...using available memory has no particular cost to me over not using it. Of course, the _available_ modifier is relevant, so I take your point.

> I'm not sure _save_ is the right word here...using available memory has no particular cost to me over not using it.

The browser not using available memory means that other processes on the system have the memory available to use. For those of us who may have the browser running while something else is actively running on the computer, that's potentially pretty important.

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

#84
post #66
post #65

Earlier quoted context omitted.

Tabs are not bookmarks. Use bookmarks.

Why should one use bookmarks rather than many tabs? I have many concurrent projects going, and things I refer to regularly, so I just leave them grouped in my tree of tabs on the sidebar. Much more efficient than digging through nested bookmark menus, or trying to make sure the bookmarks are properly classified. Basically, my tabs are bookmarks, except tabs are integrated into the web-browser better.

So, the problem is that the bookmark UI design is broken.

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

#85
post #7

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

Technically it's 3D data, with the three axes being {Time, Memory Usage, Version}. But I agree there may be a better way of visualising this data.

3D data, but 2D plots.

A histogram of a normal distribution (say, mean lifetime of a particle) is a 1D histogram. You would have counts of decays vs time. In your example, that would be 2D, but it's not.

A 2D histogram would be more like a heat map. The X axis would be time, y axis version, and the (x, y) value would be memory.

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

#86
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…

>Unresponsiveness due to one tab thrashing

Or even not trashing. When one tab asks for username/login with a pop-up ("Authentication Required" one) and you have it saved in some email opened in another tab you can't switch to email tab until you kill the login one. I call it "god window" (god tab in this case) pattern. Very typical for most old and some new Windows desktop apps.

Chrome handles it perfectly.

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

#87
post #66
post #65

Earlier quoted context omitted.

Tabs are not bookmarks. Use bookmarks.

Why should one use bookmarks rather than many tabs? I have many concurrent projects going, and things I refer to regularly, so I just leave them grouped in my tree of tabs on the sidebar. Much more efficient than digging through nested bookmark menus, or trying to make sure the bookmarks are properly classified. Basically, my tabs are bookmarks, except tabs are integrated into the web-browser better.

> Why should one use bookmarks rather than many tabs?

Because, as the parent posts point out, tabs take up memory and can cause the browser to become sluggish.

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

#88
post #65

Earlier quoted context omitted.

Tabs are not bookmarks. Use bookmarks.

Bookmarks don't save state, which is especially annoying in a time where async calls are used so heavily.

A URL should contain all of the state needed. If it doesn't then it's a poorly designed website.

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

#89
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…

>Unresponsiveness due to one tab thrashing Or even not trashing. When one tab asks for username/login with a pop-up ("Authentication Required" one) and you have it saved in some email opened in another tab you can't switch to email tab until you kill the login one. I call it "god window" (god tab in this case) pattern. Very typical for most old and some new Windows desktop apps. Chrome handles it perfectly.

They are hugely fustrating, we did per tab modal dialogs in Firefox OS, I imagine they will be fixed in desktop shortly.

https://bugzilla.mozilla.org/show_bug.cgi?id=613785 open bug for it

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

#90
post #7

Earlier quoted context omitted.

Technically it's 3D data, with the three axes being {Time, Memory Usage, Version}. But I agree there may be a better way of visualising this data.

Technically it's three trials of 2D data, with the axes being Time and Memory Usage. The width of the lines given by the version axis is for visibility, not to encode data. A 2D line graph with 3 colors for the different versions would be an appropriate visualization. This one suffers spatial distortion and is only useful in confirming that yes, they use less memory in step 2 now.

>The width of the lines given by the version axis is for visibility, not to encode data.

Bar graphs do exactly the same thing in a 2D graph. Would you suggest that all bar graphs be replaced by a one pixel wide stacked bar graph?

Of course not, because even though the samples in a bar graph are discrete, they convey order. It's the same here. The width of the lines is only for visibility, but the Z position of the lines conveys version order. A 2D line graph would only convey that by labels. And if labels were as useful as visual position, we could just replace all graphs with lists of numbers.

I personally found this graph trivial to read and comprehend. The spacial distortion is canceled out by the fact that the differences we're looking at are very large, and the steps axis is spaced out sufficiently to line up the points visually.

My only complaint is that it shouldn't be a line graph, as the steps are not continuous.

Post reply on HN