Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

Improve AngularJS performance for Read-Only Grids

$
0
0

Hello -

We are making heavy use of Kendo UI Grids in our AngularJS-based application.

 In some views, we may have up to 6 different kendo grids showing data.  We are using remote live scrolling in some and others we are loading all the data (when dataset size is small).

**All of our grids are READ-ONLY.  In other words, users are just viewing data, not editing, modifying, etc. rows**

We have discovered that each *ROW* in each table has an angular $watcher attached to it for **each** column value.

For example:

1.<trclass="k-alt ng-scope"data-uid="586ee20c-a5a7-4f61-b379-b719b1ca431e"role="row">
2.  <tdstyle="display:none"role="gridcell">
3.     <spanng-bind="dataItem.id"class="ng-binding">22</span>
4.  </td>
5.  <tdrole="gridcell">
6.     <spanng-bind="dataItem.hostname"class="ng-binding">myHost</span>
7.  </td>
8.</tr>

In the example above, **TWO** angular watches will be created for "id" and "hostname" for **each row**.

If our table has 200 rows x 2 watchers = 400 angular watchers added to the angular $digest cycle (which is run 2x every time there's an "event" that triggers the digest cycle).

We understand that for **editable** grids these watches may be required to correctly perform two-way data-binding.  However, since our grids are read-only we do **NOT** need these watches created (and they are impacting our application's performance).  

We have tried setting "editable: false" on both the grid options as well as individual columns, but it seems to have no affect.

Is there any way to prevent Kendo from creating all these **unnecessary** AngularJS watches and scopes?


Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>