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

Angular Directives in Column Templates

1 Answer 67 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dan
Top achievements
Rank 1
Dan asked on 20 Dec 2016, 10:57 PM

Hello,

We are experiencing high memory usage when using Directives in the grid's column templates.

Due to our business requirement, we have two grids on one page that each contain around 10 columns. There is a lot of different functionality between the grids so the column templates can be pretty complicated (icons for context menus, multiple line content, links..).

In order to implement these features, we thought it would be a good idea to use angular js directives in the kendo grid (using the angular js initialization of the grid of course). We could then proceed to test these directives using jasmine and even import these directives into grids in other pages.

We recently noticed, however, that this uses too much memory (about 450 MB with one grid having 20 rows and the other 120). Each single cell becomes a directive with its own child scope.

Is there any way that you'd recommend for us to create one directive for the entire column not individual cells? Or at least lower the memory usage?

Thank you.

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 23 Dec 2016, 07:06 AM
Hello Dan,

Apologies for the delayed response.

When a directive is used in the column template it is expected to have a new directive for every cell as every cell in the column is associated with a different data item.

As for optimising the memory usage, in general, reducing the page size of the Grid that currently has 120 rows will be the first options.

Still, in order to provide additional suggestions for optimising the scenario, we will need a fully runnable example. This will help us test it locally, and determine which part of the Grid can be optimised, so the memory usage stays at a reasonable level.

Regards,
Stefan
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Dan
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or