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

radGrid with 100,000 records

7 Answers 185 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Craig Smith
Top achievements
Rank 1
Craig Smith asked on 13 Aug 2008, 10:32 PM
In order for performance to be good I have no choice but to handle paging myself such that the recordset returns only the records to be displayed - am I correct?

I would have thought that when this line executed...

RadGrid1.DataSource = ds.Tables[0].DefaultView;

That, if paging was enabled, it would only actually bind the records to be displayed. But that line is taking about 40 seconds to execute so obviously the grid binds all of the data and then only displays 10 (or whatever is specified).

I've tried all of the performance tricks I could find but can't speed it up. I would prefer not to have to handle the paging myself because then I have to handle the sorting, grouping myself which kind of defeats the purpose of using a grid.


7 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 14 Aug 2008, 05:29 AM
Hello Craig,

DataSet, DataTable and DataView does not have any built-in paging functionality. Instead of passing the entire view (ds.Tables[0].DefaultView) you can pass only needed records similar to this example:
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Programming/CustomPaging/DefaultCS.aspx

Also when dealing with large data these (
DataSet, DataTable and DataView) are not the best choice - you can try for example LinqDataSource (collection of objects).

On this demo the grid is bound to 1mil. records using LinqDataSource:
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/GeneralFeatures/ASPNET35/DefaultCS.aspx

Sincerely yours,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Craig Smith
Top achievements
Rank 1
answered on 14 Aug 2008, 03:11 PM
Using Oracle on the backend so I don't think LINQDATASOURCE is an option unfortunately :(
0
Craig Smith
Top achievements
Rank 1
answered on 14 Aug 2008, 09:51 PM
We've given up on this. We tried the objectdatasource and it was fairly fast so long as we were just bringing back a single field. Once we brought back the 10 fields required for display it was extremely slow again.

We are going to implement the custom paging and only bringing back the relevent records for display. This means that grouping, sorting, and filtering will only be applied to the 20 records returned which is pretty useless. In fact, I see little benefit of using the grid as opposed to just rendering HTML. I am sad.
0
Vlad
Telerik team
answered on 15 Aug 2008, 05:59 AM
Hi Craig,

You can use collection of custom objects instead DataSet. The old ADO.NET objects are extremely expensive when dealing with large record sets. Please check this example for more info:
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Client/DataBinding/DefaultCS.aspx

You can use the same approach in your scenario. Read needed data using reader and populate a collection of custom objects. You can pass also the grid filtering and sort expressions to your select queries in order to apply the grid operations on the data-base server.

Other possible solution is to try this:
http://code2code.net/DB_Linq/

Best wishes,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Craig Smith
Top achievements
Rank 1
answered on 15 Aug 2008, 03:43 PM
Thanks. That code sample looks useful. We will see if we can get it working. The custompaging worked fine for me but I couldn't figure out how to get sorting, filtering, and grouping to work properly with it. The code you provided appears to deal with this problem. Thanks for your help.
0
Officialboss
Top achievements
Rank 1
answered on 02 Dec 2008, 06:00 PM
Hi Craig,

Were you able to find a solution?

Thanks
0
Craig Smith
Top achievements
Rank 1
answered on 02 Dec 2008, 08:21 PM
Not really. The project has since been cancelled. If I recall correctly we did get the speed such that it was acceptable by doing our own filtering and paging but if I had to do it over again I would just return HTML instead of using a GRID.
Tags
Grid
Asked by
Craig Smith
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Craig Smith
Top achievements
Rank 1
Officialboss
Top achievements
Rank 1
Share this question
or