Overriding DefaultResolver Methods

Making the resolver work asynchronously would mean that every time Ember wanted an object, it would need to get it asynchronously.

We looked at this at one point, and it’s a very invasive change that also has bad performance implications. The way people use AMD today is to expect the necessary modules to be loaded by the time the resolver is invoked.

You can use router hooks (beforeModel, for example), to asynchronously fetch code and load it before entering some part of your app, but by the time Ember needs the object, it will be available synchronously.

I don’t really think it makes sense in production for every module to be fetched synchronously to begin with.

1 Like