I have a CanJS component. The data for the component is being handled by existing legacy code. All I am doing is taking the data and populating a div based table. The table is quite complex and the stache template is 165 lines long. Response times are poor. On Chrome on a MACbook Pro, the initial load takes 4 seconds. On a PC using IE the initial load time is 24 seconds. I ran a profile on IE and learned that of the 24 seconds 15 is spent on this line:
var container = can.stache('<leaderboard-new-table {parent}="parent" ' +
'{player-rows}="playerRows" {cut-line}="cutLine" {options}="options"' +
'{is-my-lb}="isMyLb"></leaderboard-new-table>');
and 9 seconds is spent on this line:
this.$leaderboardMain.append(container({
parent: this,
options: options,
playerRows: playerRows,
isMyLb: false,
cutLine: {
position: cutLine,
showCutLine: this.context.leaderboardModel.cutLine.show_cut_line,
showProjected: this.context.leaderboardModel.cutLine.show_projected,
cutLineScore: this.context.utils.safeValue(this.context.leaderboardModel.cutLine.cut_line_score)
}
}));