Chapter 10. The Ember.js run loop—Backburner.js
This chapter covers
- Understanding the internal structure of the run loop
- Using the run loop to propagate events
- Using the run loop to improve application performance
- Executing code within a specific run loop
- Executing repeated tasks within the run loop
The Ember.js run loop is a concept unique to Ember.js and is one of the distinguishing features over similar frameworks such as AngularJS or Backbone.js. Even though the name might indicate that the run loop is implemented as a continuous loop, it’s not. During the final release candidates of Ember.js, the run loop was extracted into its own microlibrary called Backburner.js. Even though Ember.js now uses Backburner.js internally, the APIs internal to Ember.js, including the run loop API, haven’t changed. When I refer to the Ember.js run loop in this chapter, I’m referring to both the Ember.js-specific API and the underlying Backburner.js library. This separation is similar to how Ember.js integrated its other microlibraries, and it ensures that the APIs that Ember.js offers to your application can remain unchanged, while changes and optimizations to its underlying microlibraries are made.
Figure 10.1 shows how Backburner.js fits in with the rest of the Ember.js application framework.