javascript - any performance benefits from passing work to background.js -
i have chrome packaged app have made using polymer paper-elements. uses html5 audio tag stream music online service. issue when app grabs results server , parses array while playing. music stop few milliseconds. (a few seconds on lowend chromebooks) have tried use polymers async method delay work til next available microtask. helps causes undesirable things happen in interface. (content shouldn't displayed shown until async method executed)
currently have nothing happening in background.js file. happening in main.js file or within custom element.
would see performance gain using message passing push of work when parsing response background.js file?
example of work appears cause pause in audio.
var = 0; array.prototype.foreach.call(response.albumlist2.album, function (e) { // buildobject returns needed data object returned loop other needed data var obj = this.buildobject(e); // this.wall array pass core-list display this.wall.push(obj); // keep callback executing before array built = + 1; if (i === response.albumlist2.album.length) { this.async(callback); } }.bind(this));
in situation callback hides loading spinner.
thanks in advance help.
Comments
Post a Comment