⬆️ ⬇️

Chrome 55 cuts memory usage by 30%.





Google has rolled out a new version of the Chrome 55 browser on the main channel. This update will please Chrome users like no other, because the developers have done a very serious job of optimizing the use of RAM. The consumption of RAM on the tabs with the ad blocker enabled or disabled has decreased by about 30% .



For example, a site with a weather forecast Weather.com in the browser now does not occupy 340 MB, but only 250 MB. The home page of Reddit.com shrank from about 160 MB to 110 MB.



On one of the test systems, the Geektimes main page with the ad blocker disabled in the previous version of Chrome 54 occupied 65 MB. After upgrading to Chrome 55 and reloading the page, memory consumption was reduced to 58.5 MB. Half a minute later (perhaps, after the parsing was finished), a part of the RAM was released - and the Google Chrome task manager shows only 45.5 MB of occupied memory.

')

A tab with Gmail has reduced memory consumption to a modest 185-215 MB.



Developers from Google conducted their own testing . Unlike the aforementioned subjective figures from the Task Manager window, the developers used repetitive and accurate methodology using the Telemetry framework. For this framework, a script was compiled that performs standard actions on each web site ( source code ).



But the news sites and social networks scenario is as follows:



1. Opening the main page of the site.

2. Click on the first link.

3. Waiting for the page to load.

4. Scrolling down across multiple screens.

5. Pressing the back button on the previous page.

6. Follow the link to the original website and repeat steps 3–6 several times.



For a media site, the script is:



1. Opening a media item on a site, such as a YouTube video.

2. View media content for a few seconds.

3. Go to the next element and repeat steps 2−3 several times.



A number of popular sites were selected for testing in each thematic category. In the process of optimizing the V8 engine, developers again and again ran these tests with each new version, seeking to reduce the consumption of RAM. They also wrote a special utility v8 heap visualizer for visualizing statistics, which is issued by V8.





Memory occupied visualization, according to v8 heap visualizer



The developers specifically optimized the algorithm of the garbage collector and introduced more aggressive methods of compacting objects in memory, which should be especially felt on devices with a relatively small amount of memory. The following graph shows the result of this optimization in Chrome 55, compared to Chrome 53. Some pages like Hacker News and the New York Times began to occupy three times less memory space, which means 66% optimization.







In addition to the average memory consumption (graph at the top), peak memory consumption is optimized due to better field packing in the nodes of the syntax tree that the parser generates. Previously, the C ++ compiler dealt with this whenever possible, but it turned out that it did not always find the most efficient packaging methods, so the developers implemented their packaging algorithm. This not only reduced peak memory consumption, but also increased compiler and parser performance.





Peak V8 memory consumption (peak zone memory) on desktop system in versions 54 and 55



According to Google developers, in Chrome 55, the total memory consumption on computers with a small amount of RAM decreased by 35% compared to Chrome 53. On other machines (which do not belong to the low-memory devices profile), only savings from reduction of peak consumption (peak zone memory), but it is also very significant, as seen in the last graph.



In addition to the significant optimization of V8 for the consumption of RAM, the new version of Chrome 55 implemented blocking Flash-content by default, if there is a version of content on HTML5. A more comprehensive Flash lock will appear later in 2017 or 2018.



Traditionally fixed security vulnerabilities have been fixed, and a number of other new features have been implemented, including updated developer tools.



Chrome 55 for developers



Source: https://habr.com/ru/post/372941/



All Articles