This is a migrated thread and some comments may be shown as answers.

Poor Kendo performance with ng-repeat

1 Answer 74 Views
NumericTextBox
This is a migrated thread and some comments may be shown as answers.
Samuel
Top achievements
Rank 1
Samuel asked on 19 Nov 2015, 01:08 PM
We're building an AngularJS app with a table consisting of about 200 rows, each of which contains one KendoNumericTextBox. The table is built with ng-repeat, not with KendoGrid, because we need more flexibility regarding the contents of the cells.

Before we added the KendoNumericTextBoxes, loading the page took about 3s, and after adding the KendoNumericTextBoxes, it took 25s. The Chrome CPU profiler shows that most time is spent in the kendo library, which calls expensive jQuery functions.

I isolated the problem into this jsFiddle: http://jsfiddle.net/Loauc0r6/2/
In this small example, angular's Scope.$digest takes 1.4s, and if I remove the KendoNumericTextBoxes and replace it by normal inputs, it only takes 0.1s. Again, most time is spent in a kendo function called "link", which calls many expensive jQuery functions.

Can you help us to get this running faster?

1 Answer, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 23 Nov 2015, 07:16 AM
Hello,

Indeed, instantiating 200 numeric text boxes and enabling their AngularJS bindings is an expensive operation. Each widget instance performs certain actions (DOM mutation, event handler bindings) in order to provide the functionality expected. A thing worth noticing is that usually the same scenario works much faster if implemented without AngularJS - the two way databinding adds some additional performance penalties. 

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
NumericTextBox
Asked by
Samuel
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Share this question
or