Google Chrome To Compile Javascript Off Main Thread

Subject: General Tech | February 17, 2014 - 12:10 AM |
Tagged: web browser, Google Chrome, chromium

Google has announced that the latest beta for Chrome, their web browser, will compile Javascript in a background thread. In the current release version, scripts are converted to instructions, executed, monitored for performance, and swapped with a more optimized set of instructions that accomplishes the same tasks. Converting script into optimized instructions takes time. Doing it on a background thread frees up that computation time for something else.

google-chrome-jit-hang.png

This stutter was 628 milliseconds, or about 38 consecutive frames at 60 FPS.

Image Credit: Chromium Project Blog

Web browsers are designed under the assumption that a single thread of instructions will weave through every task, one by one, until everything is done. At some point, since the early 1990s, computers have been give multiple cores (and some of those designs can have multiple threads shoved through at once). The problem is now that, since "Task A" was designed to occur before "Task B", doing them separately... can break stuff good.

mozilla-architecture.jpg

A simplified browser execution flowchart. Execution follows the arrow.

Image Credit: Mozilla

Background Javascript optimization will be most effective for mobile SoCs. These processors tend to have a lot of fairly slow cores; the exact opposite of what a web browser wants. Also, video games have many tasks which occur every frame. Freeing up time on the main thread gives these apps more time to be more complex - and with less stutter (if optimizing blocks execution... which it is trying to optimize). This might also allow browsers more time to try more aggressive optimization strategies.

In case you are wondering, Mozilla started to move compilation to a background thread as of Firefox 21. Firefox 29 will move the entire just-in-time (JIT) compilation process off the main thread. This is currently in their "Aurora" release channel. To the rest of the world: it's an alpha.

This optimization is currently available in Google Chrome Beta (33).

Author:
Subject: Mobile
Manufacturer: Acer

Introduction and Design

P1040721.JPG

We have our heads in the clouds. Once a dream, cloud computing is now common and used to support everything from file sharing to email. Here at PC Perspective, for example, we often make use of Dropbox. Storing certain files “in the cloud” is much easier than directly emailing them to and fro. 

Google is one of the cloud’s most ardent supporters. The Internet seems to be Google’s answer to everything from emails to file sharing to document editing. All these tasks can be accomplished online through a browser with a Google utility. 

When Google announced that it was going to develop an entire OS based off its Chrome web browser there was much shock, speculation and excitement. In hindsight, however, this development was probably inevitable given the company’s love of everything online. Now, Google Chrome OS is a retail product. Let’s find out if a cloud OS can compete with more traditional options. 

Read on for our full review of the Acer AC700-1099 Chromebook!