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

Really Slow Data Binding

4 Answers 640 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Michael Fuller
Top achievements
Rank 1
Michael Fuller asked on 26 Feb 2010, 09:59 PM
Hello,

I currently have a page setup to display a RadGrid that is populated from a DataView created from XML.  The RadGrid uses the NeedDataSource method to bind, and relies upon AutoGenerated columns, because the columns are always changing, but the performance seems off a bit.  In the ASPX page none of the columns are defined in markup, its basically blank other for some general settings.  Sorting is enabled for the RadGrid, but is not in use for initial page load.

For 25 rows of data it takes the server 5.42 seconds to process the request, but 4.45 of those seconds are dedicated to data binding.

For 500 rows of data it takes the server 35.40 seconds to process the request, but 34.96 of those seconds are dedicated to data binding.

I did the calculation for data binding by recording the time when data binding and data bound is called for the RadGrid.

My data source is created from XML, processed by our own system, and returned to the RadGrid as a DataView, and is pretty quick.  We also have a custom To Excel function which also takes about 0.5 seconds to export 500 rows, so the data source is pretty fast.

Also:  I have been looking deeper into the DataBinding by looking at the ItemDataBound method and found that this function is called on average every 0.11 seconds until data binding is complete.

4 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 01 Mar 2010, 03:01 PM
Hello Michael,

Have you considered taking advantage of the paging feature of our web grid? Thus only a subset of records visible on the rendered page will be fetched from the underlying source.

Other useful tips how to optimize the performance of the control can be found in the following resources:
http://www.telerik.com/help/aspnet-ajax/gridoverview.html (chapter "Performance tips and tricks")
http://www.telerik.com/products/aspnet-ajax/resources/top-performance.aspx
http://www.telerik.com/support/aspnet-ajax.aspx (Section "Performance")

All the best,
Pavlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Michael Fuller
Top achievements
Rank 1
answered on 01 Mar 2010, 03:14 PM
We are using the paging feature, its currently set to 25 rows, and the performance is the same as for pages of size 250 when it comes to data binding.

Also Sorting & Grouping are Disabled, C#, and we are using a near recent version of the software.
0
Pavlina
Telerik team
answered on 01 Mar 2010, 04:51 PM
Hi Michael,

Have you reviewed the resources elaborating on performance optimizations linked previously in this forum thread? Are they helpful to you? Moreover, you can examine the demos from the 'Performance' section of the RadGrid which apply those methods in reality:
http://demos.telerik.com/aspnet-ajax/grid/examples/overview/defaultcs.aspx 

Kind regards,
Pavlina
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Michael Fuller
Top achievements
Rank 1
answered on 01 Mar 2010, 10:12 PM
Everything is fixed, it looks like one of our internal components is really slow when accessing a commonly used identification variable, so everytime it was referenced in code it would slow everything down, so after cacheing it to a local int variable everything ran smoothly again, thanks for a great control.
Tags
Grid
Asked by
Michael Fuller
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Michael Fuller
Top achievements
Rank 1
Share this question
or