javascript - How to optimize JS code? -


chrome profiling say: "not optimized: assignment parameter in arguments object". can optimize code?

this.buffer.foreach(function(tilepos, ypos) {   tilepos.foreach(function(tileinfo, xpos)   {     _self.tiles.puttile('ground', xpos, ypos, _self.ground);   }); }); 

it not acting on tilepos within block.

i recommend doing follows if wish eliminate error, bit of performance boost:

for(var = 0; < this.buffer.length; i++) {     for(var j = 0; j < this.buffer[i].length; j++)     {         _self.tiles.puttile('ground', i, j, _self.ground);     } } 

Comments

Popular posts from this blog

java - Solr query version issue: Invalid version or the data in not in 'javabin' format -

Hard vs. Soft Water: What's The Difference?

The Ten Most Livable Cities In The World