Bigger screens and web browser memory - ΩJr. Software Articles and Products

This information lives on a web page hosted at the following web address: 'https://omegajunior.globat.com/code/'.

The size of a computer monitor and that of the windows it displays, affects a webbrowser's memory consumption. Research and conclusions.

A.E.Veltstra
Sunday, November 22, 2009

What are the reasons for a web browser to use more memory?

Well... for instance, adding more objects to the displayed document. Or adding objects that are heavy with events. Like the duplication method in the Canvas Composition Studio. It duplicates objects that hold custom information and events, and immediately selects them, to allow continued duplication. Fills up memory quite quickly.

That kind of memory use is expected. It'd be nice if the web browsers would release that memory after the objects are deleted, or after the window holding the page is closed. In this respect, Chrome fares a bit better than Opera, but Firefox beats both of them.

What about unexpected memory use? For instance, when displaying the Canvas Composition Studio in Opera 10, upon firing the event that scales the studio area to the available screen, the browser all of a sudden adds 4MB up to 15MB to its memory consumption.

How come? Apparently, the cause of this jump lies in a combination of the background images and the size of the window.

Personally we had thought, that displaying a background image requires only the memory needed to read that image (which, in the case of the CCS, is 12KB). Apparently, Opera duplicates that amount for each time the image is repeated... resulting in a smaller memory use on smaller screens, and a larger memory use on larger screens.

Yay. Not.

Worse: the jump varies from 4 to 15MB, even when testing in the same window size. Sometimes Opera uses more, and sometimes it uses less. Like as if sometimes, Opera is able to optimize based on predictions about what is going to happen, and sometimes it isn't. On the same page. One reload later.

Yay again. Not either.

Try building a test case for that.

Need problem solving?

Talk to me. Let's meet for coffee or over lunch. Mail me at “omegajunior at protonmail dot com”.