You are here: Home » NewsFeeds » A new approach to text rendering

A new approach to text rendering

In Atom 1.19, we’re landing a complete rewrite of the text editor’s DOM interaction layer that improves rendering performance and simplifies the code. Prompted by the availability of some valuable new DOM APIs with the upgrade to Electron 1.6, we decided to start over from the beginning and take a critical look at the structure and performance every aspect of our DOM interaction. You should observe the biggest difference when scrolling. Here is a typical frame after scrolling by 15 lines before and after the rewrite:

Before: Scrolling 15 lines in Atom 1.18 (~30ms):

After: Scrolling 15 lines in Atom 1.19 (~16ms):

About a 50% improvement, give or take some noise on any given frame.

You should also experience more responsive typing. Here’s a before-and-after for a typical frame following a character insertion:

Before: Rendering a character insertion in Atom 1.18 (~8ms):

After: Rendering a character insertion in Atom 1.19 (~5.7ms):

In this case the speedup is


 

Original article