kendo-labs / knockout-kendo

A project to create a robust set of Knockout.js bindings for the Kendo UI widgets.
http://kendo-labs.github.com/knockout-kendo/
273 stars 144 forks source link

Performance in forms with a large amout of Kendo UI widgets #39

Closed fbuchinger closed 11 years ago

fbuchinger commented 11 years ago

I am using knockout-kendo to data-bind a form with approx. 30 Kendo-UI-widgets and 50 HTML-Only-widgets (text fields etc). The form model is hierarchical (form -> form tab -> fieldset -> formfield widget), and I am using additional components like knockout-validation.

Here is a contrived example: http://jsfiddle.net/ZEFgJ/2/

Since ko.applyBindings sometimes takes more than 1 second and the overall performance is a bit modest, I'm investigating ways to speed things up. I'm especially worried about some "script timeout notifications" yielded in slower browsers.

Any suggestions how I could improve the binding performance? Suggestions that came to my mind so far:

any other suggestions that can bring me on the right track?

thanks,

Franz

fbuchinger commented 11 years ago

Hi Ryan,

yesterday I discovered Michael Best's knockout-deferred-updates plugin (http://mbest.github.com/knockout-deferred-updates/) which brought an immediate performance improvement to my kendo-knockout app and removed the "script timeout notifications". can you recommend to use it with knockout-kendo? or are there things i should be aware of?

regards,

Franz

rniemeyer commented 11 years ago

@fbuchinger - hello, I did not get to look into your perf issues or make any suggestions yet, but I don't see any problem with using the deferred updates plugin.

rniemeyer commented 11 years ago

@fbuchinger - how is your performance doing with the deferred updates plugin and the changes we made in #46?

fbuchinger commented 11 years ago

@rniemeyer the deferred updates and the lazy binding are working fine so far... however i am experiencing "long running script errors" in ie8 on slower systems during the model creation phase. Since I am using a hierarchical JSON tree (~80kb of data) as source for my models, ko.mapping.fromJS()was the main culprit for the "long running" script errors. I replaced it with custom mapping code, now the error pops up occassionally on larger forms with ~80 models or more. I suppose I have to switch to async model generation to really eliminate it.