Jump to content



Photo

The memory eater called Web Browser

chrome firefox ie opera java

  • Please log in to reply
13 replies to this topic

#1 emilxp

emilxp

    Neowinian

  • Joined: 20-December 10

Posted 28 April 2013 - 08:48

Everyone has encountered this unstoppable memory eater called web browser. I've been using it myself you know for ALOT of time and it's not very pleasing.

I've made some analysis and saw that the main page of neowin isn't so big and the browser doesn't have to download much code, images and other needed files for displaying the page, but why does 600KB of data stretch to 100MB for example in Chrome?

Does anyone know what eats the whole memory? The rendering, displaying, storing data structures of the page or the V8 engine with it's JavaScript interpretation or the Flash Player or some other memory eating beast? I suspect V8 for that. Even without all the flash player instances in a webpage it still uses an awful lot of memory, if I use a flash player blocking extension for example or check the Chrome task manager and see how much memory all flash player instances use.

What's the oppinion of the neowin community? Where goes all our precious memory?


#2 +Nik L

Nik L

    Where's my pants?

  • Tech Issues Solved: 2
  • Joined: 14-January 03

Posted 28 April 2013 - 09:02

So because a web browser downloads a page with an estimated weight of 600k that's all it should use?

What?

#3 cork1958

cork1958

    Neowinian

  • Tech Issues Solved: 2
  • Joined: 04-October 02

Posted 28 April 2013 - 09:15

I think OP is just trying to figure out why this site is so dang slow the majority of the time when there really isn't much to it?

I know I'd like to know as would a whole bunch of other people as there is a topic here devoted totally to that which is multiple pages long.

#4 +Nik L

Nik L

    Where's my pants?

  • Tech Issues Solved: 2
  • Joined: 14-January 03

Posted 28 April 2013 - 09:25

So use that thread?

Why does the browser's memory usage grow so easily?

Extensibility. Plugins. Extras.

#5 The_Decryptor

The_Decryptor

    STEAL THE DECLARATION OF INDEPENDENCE

  • Tech Issues Solved: 5
  • Joined: 28-September 02
  • Location: Sol System
  • OS: iSymbian 9.2 SP24.8 Mars Bar

Posted 28 April 2013 - 09:28

Lets use this image as an example

Posted Image

On-disk it's 299KB but decompressed in memory it's 5.3MB. And that's just one image, every single image used takes up memory (Scaled copies, headers, pointers, temporary surfaces used for drawing, etc.), along with the actual screen contents used for rendering (Browsers these days don't draw web pages as a single screen sized image, they split it up into segments and overlay them, meaning you could easy be using 3 or 4 large images to represent a single page, using even more memory, etc.) And then you just have stuff like the DOM (A DOM elemeent takes up more memory than the compressed text that represents it, etc.) CSS information, scripts (compiled and uncompiled), script memory usage, etc.

#6 OP emilxp

emilxp

    Neowinian

  • Joined: 20-December 10

Posted 28 April 2013 - 09:50

First off, plugins and extensions aside. We're concentrating on the page itself. Even without them it still takes alot of memory and CPU resources. I agree with The_Decryptor about the decompressed images and the big rendered images. It's a good explanation, but still there was one time a page which took almost 700MB of my memory and it was just a simple article. Probably a memory leak, dunno. How much memory does the JavaScript portion of the neowin page take? Are there tools avaliable to acquire this information?

#7 +Nik L

Nik L

    Where's my pants?

  • Tech Issues Solved: 2
  • Joined: 14-January 03

Posted 28 April 2013 - 10:30

First off, plugins and extensions aside

You don't just get to say that! They can't just be written off.

#8 Steven P.

Steven P.

    aka Neobond

  • Tech Issues Solved: 88
  • Joined: 09-July 01
  • Location: Neowin HQ

Posted 28 April 2013 - 10:37

Well when you view a page with a lot of media, that takes up memory too, as well as browser cache and a system to intelligently access it.

Edit: Didn't read The_Decrypters post first :p

#9 Javik

Javik

    #GamerGate

  • Tech Issues Solved: 2
  • Joined: 21-May 12

Posted 28 April 2013 - 10:39

Remember, the browser does a lot of other stuff in the background... HTTP pipelining, JIT javascript compilation (which eats up quite a lot of memory just by itself) , and other stuff. Unless you're running critically low on memory it's not worth panicking about, memory is there to be used it does no good sitting idle and empty ;)

#10 lmaobox

lmaobox

    Neowinian

  • Joined: 12-November 12

Posted 28 April 2013 - 10:44

Download more RAM!

#11 Steven P.

Steven P.

    aka Neobond

  • Tech Issues Solved: 88
  • Joined: 09-July 01
  • Location: Neowin HQ

Posted 28 April 2013 - 10:44

I think the major problems (especially with Firefox in the past) is that the memory management wasn't all that good, for example after more than a day with the browser open and in that time countless tabs opened and closed, the only way to flush the memory footprint taken up by the browser was to close and restart it.

I use Chrome now, so I don't know how much has changed there, all I know is what I had to do everyday with it :p

#12 Semtex

Semtex

    Neowinian

  • Joined: 20-February 11
  • Location: Europa/Poland

Posted 28 April 2013 - 10:50

I use Chrome now, so I don't know how much has changed there, all I know is what I had to do everyday with it :p


Firefox, now, plays very well with RAM, and in a past, there was problem mostly with addons leaking memory then with Firefox it self, most addon devs made their home work. For example Ad Block Plus still rise overall RAM usage in some about 100MB, but in times with PC +4GB RAM this is small price ;)

#13 Phouchg

Phouchg

    has stopped responding

  • Tech Issues Solved: 9
  • Joined: 28-March 11

Posted 28 April 2013 - 11:10

It's "time vs space" trade-off. The interpreted nature of webpages is not of the efficient sort to begin with. In browsers you have all too many of these - various attempts at HTML and CSS versions, both usually full of workarounds, leeways, lax attitude and generally shyte code, and then the awesome JS, being previous two plus getting compiled so it doesn't have to interpret it all over again for each little event that happens to run some JS.

They're all actually doing a really good job with a totally backasswards technology in the first place.

Thus it clogs up your RAM. RAM is intended to be used exactly in this way, though. If it sits empty, you've wasted your money.

#14 Javik

Javik

    #GamerGate

  • Tech Issues Solved: 2
  • Joined: 21-May 12

Posted 28 April 2013 - 12:01

Also, tab process isolation causes more overheads as well.