Intensive web applications should run smoother in Chrome

Nov 22, 2011 09:41 GMT  ·  By
Web apps should run smoother in Google Chrome with the new V8 JavaScript incremental garbage collector
   Web apps should run smoother in Google Chrome with the new V8 JavaScript incremental garbage collector

Mozilla is not the only browser maker working on improving JavaScript performance and memory usage. Google has just announced that the latest Chrome/Chromium builds include V8's new incremental garbage collector (GC).

This new GC is designed to create less disruptive interruptions of the processing flow, ensuring that web apps, especially those that put a lot of strain on the computer, run much smoother than before.

The whole idea of using an incremental garbage collector is to minimize the impact of the process on performance.

Because the main JavaScript process has to stop when GC occurs, doing garbage collection more often but for shorter periods means less freezes and hiccups in performance.

While incremental GC has some disadvantages, in that it affects overall performance more, it does ensure a smoother experience, which is preferred to an erratic behavior with higher peak performance but also short freezes or slowdowns.

"With the advent of technologies like WebGL we’re seeing the emergence of highly interactive and graphically intensive apps, such as the new version of Google Maps, new games and demos," Vyacheslav Egorov and Erik Corry, software engineers at Google, wrote.

"Avoiding pauses is vital to achieving good interactive performance. Previously, garbage collection pause times depended on the amount of memory used," they explain.

"Therefore, large interactive apps were impacted by pauses that caused hiccuping. V8’s new GC reduces pause times dramatically while maintaining great peak performance and memory use," they added.

In order to test the effect of the new incremental GC, Google selected some appropriate tests from the V8 Benchmarking Suite and determined that the maximum time to render a frame, the cause of the hiccups, went from 272ms to just 50ms.

Google's new incremental garbage collector is already available in the dev channel. Google Chrome 17.0.938.0 dev, released last week, includes the V8 3.7.6.0 JavaScript engine with the new GC.