Performance of WebAssembly: a thread on threading

Google Earth
May 22, 2019 · 2 min read

By Jordon Mears, Tech Lead Manager, Google Earth on Web

It’s been a while since we’ve discussed moving Earth towards WebAssembly (WASM) and away from Native Client (NaCl). In my last article, I talked about how WebAssembly is the new W3C standard way of compiling native applications for the web. This technology is in the process of being standardized and adopted by browsers across the industry. Recent advancements in WASM’s threading support is paving the way for Earth to provide a smooth experience across browsers.

Take a look at this side-by-side comparison of how Earth performs with and without threads.

At the 2018 Chrome Dev Summit we presented some performance metrics of the gains Earth gets when using threads. Let me give you a better breakdown of this with more detail.

Better Performance with Threads

One way to think about Google Earth is as a really big video game of the whole world. We’re constantly streaming 3D data and imagery across the network, decompressing it and then showing it on the globe. Fetching and decompressing data on background threads allows the main rendering loop to execute much faster, resulting in higher average framerate:

Image for post
Image for post

Also, there is a lot less frame dropping in a threaded experience:

Image for post
Image for post

Details of the test:

  • Ran on a stripped down version of Earth that would fly the camera from location to location in a prescribed order.

Earth on WASM coming soon

The advantage of threading support in the case of Earth is a pretty clear improvement for the user experience. We’re excited to see major browsers working towards supporting threading by default. Chrome has recently added support starting with version 74. We are also looking forward to default support of LLVM which will provide faster builds, better debugging, and SIMD support.

We look forward to sharing preview access in the coming weeks.

Google Earth and Earth Engine

For developers, scientists, explorers and storytellers

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store