Hi all, and welcome!
I think you're absolutely correct to consider performance very carefully when targeting mobile devices. More and more people use mobiles and tablets to browse the web, so our applications need to treat them as first-class citizens.
I'm aware that the
knockoutjs.com site currently gives a bad impression of mobile performance - you are right that the live examples there run very sluggishly (on mobile safari, at least). The good news is that this isn't at all caused by the knockout.js library, but rather is a consequence of the layout and styling of the pages on the examples website.
To show this is the case, I've done three things:
(1) I've made a one-line CSS tweak to
http://knockoutjs.com/examples/grid.html, and it now runs massively faster. On my iPhone 3GS (not exactly a new device), you can now switch between pages in about 0.1 seconds, whereas before the CSS tweak it took about 0.8 seconds to switch pages. Try it out and see if you can see the improvement. (Note: the CSS tweak was just putting a fixed height on the box around the grid, so the browser no longer has to rerender the rest of the document when you change pages).
(2) I've also duplicated the grid example at
http://jsfiddle.net/qJavL/ without the rest of the page's styling. Try it on an iPad - you'll find it's massively faster than running the exact same code on
knockoutjs.com.
So, what makes
knockoutjs.com slow? It's a mixture of things, none of which are related to knockout.js itself: the very large background image, the box shadows, and quite significantly the client-side syntax highlighting. These things cause the HTML rendering to be expensive, and on slow devices, that's really noticable. The lesson is to keep your markup fast to render, which means being careful about complex CSS, large background images, etc. I should also point out that when the animated transitions are actually in the process of animating, knockout.js itself is doing *nothing at all* (KO just tells jQuery to start the animations), so certainly can't be influencing the animation speed.
Thanks!
Steve