|
|
|
|
|
by jashkenas
5243 days ago
|
|
So, the reason why you want to bootstrap the models you need for an initial render, directly into the page ... instead of doing this: myApp.init = function() {
Books.fetch();
Authors.fetch();
Notes.fetch();
...
};
... is because, all else being equal, it will noticeably improve the speed of your initial page load. Instead of N separate HTTP requests, all of your model data is available in the same HTTP request that fetches the HTML. Put the bootstrap at the bottom of your page, and you're in pretty good shape. |
|