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

ajax grid performance problem

4 Answers 63 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
martonx
Top achievements
Rank 1
martonx asked on 11 Feb 2012, 07:33 AM
Hello,

I have an ajax data bounded Telerik grid, with enabled filtering, paging, sorting. It is working, and simple.
My data is an SQL view with hundreds of thousands of datarows, and more than sixty columns.
Initialize the grid is about 30 second, but this is normal, becaue of mass data.
My problem is the poor filtering, and paging performance. Any filter, or page action is further 30-30 seconds.

How can I boost the performance? How can I configure the grid parameters? How can I use ajax based grid, with server side filter, to reduce the amount of data?
Should I use server side data binding instead of ajax?

Please advice to improve the performance of my grid.

Thank you very much, and sorry for my poor english!

4 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 13 Feb 2012, 09:39 AM
Hi,

 You forgot to mention how you are populating the grid. If you are using some LINQ provider which supports expression compilation to SQL you should be getting the best performance out of the box. The grid generates LINQ queries when performing paging, sorting, filtering and grouping. If for example you are using Linq 2 SQL, Entity Framework or Telerik OpenAccess your queries will be executed in the database and only a single page of data would be retrieved.

Regards,
Atanas Korchev
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
martonx
Top achievements
Rank 1
answered on 13 Feb 2012, 10:59 PM
Hi Admin,

I'm using EF with Linq to populate data to grid. If Telerik grid use optimal Linq queries, I don't understand the long response times.
0
Accepted
Atanas Korchev
Telerik team
answered on 14 Feb 2012, 08:18 AM
Hi,

 I am not sure how to help you further. Have you tried profiling your database queries using SQL profiler?

All the best,
Atanas Korchev
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
martonx
Top achievements
Rank 1
answered on 15 Feb 2012, 08:19 PM
Hi,

I solved the problem. This is very strange.

If I have this in my Index_Ajax controller:

var ret = db.table.tolist();

And I use this ret variable to give back to the gridmodel, than ajax filtering is useless, every case the generated EF SQL is the same: select * from table

If I have this in my Index_Ajax controller:

var ret = from r in db.table select r;

And I use this ret variable to give back to the gridmodel, than ajax filtering is working like charm. First generate a count(1) select, then a top (page row number) select with correct where.

Strange, I thougt the two controller would have the same result, but no. Perhaps this is a telerik bug?

Kind regards,
Tags
Grid
Asked by
martonx
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
martonx
Top achievements
Rank 1
Share this question
or