3 ms·
I love knockout but I'm not sure whether to risk using it in mobile apps. Can anybody report on performance in a mobile SPA with a few views?
by basicallydan 13y ago
I love knockout but I'm not sure whether to risk using it in mobile apps. Can anybody report on performance in a mobile SPA with a few views?
- benmorris 13y agoKnockout is pretty focused on what it is for (data binding). In my experience it works well for mobile apps as well. If you want full blown SPA with knockout check out Durandal. I'm also using it with success on mobile.
- basicallydan 13y agoGreat, thanks!
- taude 13y agoWe're using it in a responsive website that renders on tablets...not quite mobile, and not delivered via a packaged web-view app. It performs fine for 99% t of our use cases on more modern tablets. Most JavaScript apps suck on < iPad 2 vintage tablets anyway. I wouldn't go rendering a 1000 templates client-side with it. (We have one list that renders a complex template 100x) and it takes about 3500 ms for the knockout rendering of it. This template has maybe 20 conditionals in it or so.
- basicallydan 13y agoThat's good to hear. Thanks very much for your thoughts :)
- skilesare 13y agoIt is all in how you set up your bindings. If you have everything 'visible' to the user at once you're going to get some slow performance. I have a simple state observable and then I wrap my 'views' in a if: state() == 'x' knockout comment. This moves the entire view out of memory until the state changes. In addition I have a fixture loader that loads the view files in as they are needed. This speed things up nicely as my base html file is much smaller.