Alexandros K
Alexandros K

Reputation: 947

Parallel ajax requests with Ember.js and Ember Data

I'm using Ember Data with a custom Adapter to query a JSON endpoint. I've noticed that although my app is set up to make Ajax requests in parallel, Ember will always make them in series.

So for example:

App.ModelA.query({args})
App.ModelB.query({args})

will result in ModelB's query coming after ModelA is complete. As well, the views dependent on ModelA will not update until both ModelA and ModelB have returned.

I'm wondering if there is something built into Ember Data to effect this? (i.e. as a precaution for avoiding race conditions?)

Upvotes: 1

Views: 391

Answers (1)

Alexandros K
Alexandros K

Reputation: 947

My bad!! This had to do with a 3rd party library that was used in the custom adapter! Essentially the calls to the library were being queued, independently of Ember.Data!

Upvotes: 1

Related Questions