What’s next for the Glimmer mobile JavaScript library

Library for mobile apps getting custom bytecode for faster loading and even performance improvements

Thinkstock

Glimmer, a library for building mobile applications that arose out of the Ember.js front-end JavaScript stack, will use custom bytecode to improve web application loading on mobile devices.

The Glimmer UI component library features a virtual machine architecture similar to the JVM in Java and Microsoft’s Common Language Runtime. This virtual machine is built to run inside the browser for use in web UIs. Glimmer and Ember also feature the Handlebars open source library for templating. Because Glimmer is the rendering engine for Ember, improvements in Glimmer help Ember as well.

New features speed compilation and mobile app performance

Also known as Glimmerjs, Glimmer now compiles templates to JSON, which parses quicker than JavaScript. Developers write in either JavaScript or TypeScript.

But an experimental beta version eliminates the parsing cost by compiling to custom bytecode, eliminating a performance bottleneck on low-end smartphones, said Tom Dale, codeveloper of Glimmer and Ember and a senior staff software engineer at LinkedIn. The experimental code has also shown performance benefits on an iPhone as well.

The next production version of Glimmer will incorporate the new custon bytecode approach, though no release date has been set for that next production version.

Other new features planned for Glimmer

Also expected in that next Glimmer version are features to improve the performance of applications in the browser. These include:

  • Support for the WebAssembly binary code format, which also would speed up web app performance in Glimmer. Due around spring 2018, the WebAssembly support would improve load times and runtimes further. Sophisticated web applications would load instantly even on low-end smartphones, Dale said.
  • Experimental support for Web Workers, which would bring parallel execution capabilities to JavaScript and would allow rendering to be offloaded.

Where to download Glimmer

You can download Glimmer technologies on Github. Developers can try out the beta bytecode version from the Glimmer playground and clicking the π button in the bottom right corner to see decompiled output.