I have a search that returns JSON, which I then transform into a HTML table in Javascript. It repeatedly calls the jQuery.append() method, once for each row. I have a modern m
Multiple DOM append operations will kill performance. And you may run into a problem with string immutability as well.
Keep the data as small as possible (JSON arrays are good), and build the html in script avoiding the javascript string concatenation problem. Append the html values to an array, and then join the array afterwards. Do one DOM append once the html has been created. eg
var builder = [];
//Inside a loop
builder.push('');
builder.push(json.value);
builder.push(' ');
//Outside the loop
$('div').append(builder.join(''));