i wrote a Jquery foreach loop through a object. IE takes 15.8ms to execute the code whereas Chrome takes 1.164ms to execute the code. what change i need to do so that in IE it runs faster??
$.each(prefs.ResultColumnPreferences, function (key, value) {
if (value.IsLPID) {
headerRow.append($("<th/>").text(prefs.ResultColumnPreferences[i].DisplayName + "LPID"));
hideList.push(headerRow.children().length - 1);
}
else if (value.IsMultivalue) {
headerRow.append($("<th/>").text(prefs.ResultColumnPreferences[i].DisplayName + "Multivalue"));
hideList.push(headerRow.children().length - 1);
}
headerRow.append($("<th/>").text(value.DisplayName));
if (!value.IsVisible) {
hideList.push(headerRow.children().length - 1);
}
if (prefs.SortBy === value.PropertyName) {
if (prefs.SortOrder === 1) {
orderList = [[headerRow.children().length - 1, "asc"]];
}
else {
orderList = [[headerRow.children().length - 1, "desc"]];
}
}
});