PDA

View Full Version : Is it aventageous to use a task runner when loading a store from an Ajax request?



jbirchfield
24 Oct 2012, 12:05 PM
When I first load my app, I have to make load calls to many stores (10+). In an attempt to make everything asynchronous and not cause any blocking, I wrap each load in a task, and use a taskRunner to run them. Is this buying me anything, or causing me more overhead than I need? I am not sure if the load call going through the Ajax proxy is already ran asynchronously. Here is a snippet:


var dseTask = runner.newTask({
run : function() {
systemEngagementStore.load({
// we use the ParameterUtils to load up a
// valid
// parameters object
params : ParameterUtils
.to_parameters(paramsMap)
});
},
repeat : 1,
interval : 10
});
dseTask.start();


Thanks!
Birch

evant
24 Oct 2012, 12:47 PM
It's just causing extra overhead, since the ajax calls run asynchronously anyway.