Splitting up and delegating long computations
A lot of data entry and productivity applications are usually waiting around for the user to do something rather than the reverse. However, if your app performs long computations (whatever they may be), you're likely to find yourself with an unwelcome occurrence of the dreaded frozen app.
JavaScript itself is single-threaded. This means that your code has control until it relinquishes control back to the browser, at which point the browser can begin to render the DOM and detect events. These events will often trigger more of your code, and the cycle will repeat.
Normally, your code will execute quickly enough that the user won't notice. That is, they'll be scrolling around in your app, or they will be switching views or tapping buttons. They hopefully won't notice when your code is running. But if you need to compute a complex calculation that takes more than 16.67 ms, they'll start noticing, because you'll see visual stuttering again.
The problem...