Hi Peter,
I don't see any glaring problems with your code. I could recommend
the obvious (streamlining your json, not returning as many rows,
etc.), but that is not really the point. Is there a bottleneck in
knockout that is causing slow execution in IE? It does appear IE
renders this template sample slower than compared to say Chrome. Let's
find out what is going on. Grab your pitch forks, there is an Ogre in
the village!
It did a quick profiling with your sample on my computer, and Chrome
was approx 4-5x faster than IE9 (I don't have IE8 installed). If you
walk the call tree (in either browser) you will see that 80-90% of the
scripts execution is spent in executeTemplate function. Dig deeper
and you will see that time split fairly evenly between the
"jQuery.tmpl" call, and "ko.utils.arrayForEach". Within the
arrayForEach call, 25% of script time is spent within the "unmemoize"
function, and 10% for "findMemoNodes". Are there optimizations
lurking here, very possibly.
So what is my point? From an execution breakdown based on
percentages, both browsers are handling the call stack in the same
manner (despite having completely different javascript engines). Any
optimization to the code, should benefit either browser. Of course,
it is getting late and perhaps I really don't have a point. :) who
knows! It was fun to profile out the code anyways.
Having said all that, there is a pull request for knockout currently
on the github site. It is an optimization to cache template loading,
submitted by canadianveggie (Pulse Energy). I've tested it with your
sample it shaved nearly 20% of execution time off your sample in IE9.
So the Canadians are eating there veggies and optimizing code. You
should to!
Hope you found the information helpful.