Opera announced yesterday that the company has been experimenting with a new memory Heap compaction feature in the Dev and Beta versions of Opera for some time.
The new feature promises better memory usage in Opera 39 and newer by adding a heap compaction phase to the browser's memory management functionality.
Basically, what the new memory management feature does is reduce memory fragmentation of the web browser by adding the heap compaction function to it.
We attacked memory fragmentation by implementing a cheap, single-pass inplace compaction of heaps (picture a “heap” as the “cupboard” in the analogy above). The benefits are two-fold: less heap memory is allocated, and live objects are packed tighter, thereby increasing memory locality and speed of access.
The new function adds two benefits to the browser according to Opera: first, it reduces the amount of heap memory allocated at any given point in time. Second, it improves memory locality and therefore speed of access.
Opera ran some tests on popular sites and noticed noticeable heap size reductions. On The New York Times website, heap size went down to 4.0 MB from 9.0 MB. Similar improvements were measured on Gmail, Amazon or Wikipedia where heap size almost always halved or saw an even better reduction than that.
One should not confuse heap size with overall memory use of the browser though. A quick, unscientific test of my own showed no noticeable improvements in Opera Developer (with heap compaction) over Opera Stable (without heap compaction).
The methodology I used was simple: open x sites in Opera Developer and Stable, and compare memory use in Windows Explorer after a while. Obviously, this is not the best of methodologies and a scientific test would use other memory measurement tools for that and probably some automation on top of that.
This does not mean that there is no improvement though, and it is likely that your mileage will vary depending on the sites you visit and your actions on those sites.
Opera plans to integrate heap compaction in the Blink engine. If the company does that, all other Blink-based browsers, Chrome and Vivaldi for instance, will benefit from the feature as well.
Now You: How big of a role plays a browser's memory use for you?Advertisement
Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.
We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.
If you like our content, and would like to help, please consider making a contribution:
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.