Search code examples
ember.jsweb-worker

Ember concurrency vs Web workers


I'm looking to sort through a huge JSON object without blocking any of the UI rendering that goes on.

I'm confident that Web workers achieve this (as this is one of the main use cases for it). However from the docs it doesn't seem that Ember-concurrency achieves non-blocking state. It only mentions how it makes life easier to deal with async functions. Is Ember concurrency a non-blocking library? If so how does it differ from Web workers?


Solution

  • Ember Concurrency is a blocking library, it really shines when dealing with scheduling reoccurring tasks. Their main ideas and goals are listed on their page (http://ember-concurrency.com/#/docs).

    Web workers work on a separate thread from the browser's simulated single thread. In an essence you wouldn't block the UI rendering, but if your web worker(s) are doing enough work you may still see a degraded performance of UI rendering.