RadControls for ASP.NET AJAX - Now with more speed!

Thursday, October 15, 2009 by ASP.NET AJAX Team | Comments 6

The Q3 2009 release comes packed with goodies and we hope you'll enjoy the new additions to your toolbox. And it's fast too.

For starters, a number of micro-optimizations on the client-side has resulted in less boilerplate code. But the big breakthrough comes on the server-side where you can expect improvements of up to 30%, depending on your scenario.

So, how did we manage to do it? By deleting code, of course. Well, not just any code, but a reflection-intensive piece that was seeing a lot of use.

412158673_343bc90041_m

Just don't spend too much time Reflecting.

(Photo by http://www.flickr.com/photos/welshbaloney/)

The code in question is crucial to control operations – the DescribeComponent method. It's responsible for serializing control properties and sending them to the client-side control counter-parts. Until now this was done with reflection, but we've figured out a way to get rid of it. It was replaced with a set of shiny new T4 templates that do the same job, but at compile time.

Don't just take my word for it - we have benchmarks. The test page is a typical* form:

Form

* User Experience experts can show signs of violent disagreement upon reading this statement.Agree with everything they say and you’ll be fine.

I've used the excellent Eqatec Profiler (it's free by the way - http://www.eqatec.com/tools/profiler) for measuring performance:

DescribeComponent

That's almost 30% improvement! I know, I know – it's only 27,55344%, but it's still pretty good!

The Q3 2009 Beta will be available in your Client.NET accounts tomorrow. Feedback is welcome, as usual!

You can download the sample project here:

DescribeComponent.zip

6 Comments

  • RT 15 Oct
    Wow.. this is great! Do you expect any regression issues or should I be ok with upgrading to the latest release. I use telerik grids all over in my app and customers have been complaining about performance. I really want to upgrade to the new version as soon as it comes out.  
  • Tsvetomir Tsonev 16 Oct
    No, we don't really expect regressions at this point. We did our best to cover the changes with unit tests and we have specific tests that compare old vs. new code to make sure it behaves the same. We've cleared any issues that made it past the unit tests through our usual QA process.


  • Richard Orchard 16 Oct
    This is great news.

    It would be really good if the size of the javascript files could be cut down as well.  When you have got customers in lots of different countries, some without great internet connections, you have be conscious of the "size of files" - even when using the various compression, combining scripts, the size of the files can be pretty big.

  • Jeff 17 Oct
    I just upgraded to the beta and I am getting the following exception in all the pages that use the RadGrid.. Any Ideas ???

    [ArgumentException: Input array is longer than the number of columns in this table.]
    System.Data.DataTable.NewRecordFromArray(Object[] value) +1863467
    System.Data.DataTable.LoadDataRow(Object[] values, Boolean fAcceptChanges) +70
    Telerik.WebControls.GridDataTableFromEnumerable.FillData() +4816
    Telerik.WebControls.GridResolveEnumerable.Initialize() +43
    Telerik.WebControls.GridResolveEnumerable.EnsureInitialized() +32
    Telerik.WebControls.GridResolveEnumerable.get_DataTable() +25
    Telerik.WebControls.GridEnumerableFromDataView..ctor(GridTableView owner, IEnumerable enumerable, Boolean CaseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields) +187
    Telerik.WebControls.GridDataSourceHelper.CreateGridEnumerable(GridTableView owner, IEnumerable enumerable, Boolean caseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields) +149
    Telerik.WebControls.GridDataSourceHelper.GetResolvedDataSource(GridTableView owner, Object dataSource, String dataMember, Boolean caseSensitive, Boolean autoGenerateColumns, GridColumnCollection presentColumns, String[] additionalField, Boolean retrieveAllFields) +524
    Telerik.WebControls.GridTableView.get_ResolvedDataSource() +196
    Telerik.WebControls.GridTableView.CreateControlHierarchy(Boolean useDataSource) +144
    Telerik.WebControls.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +421
    System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +59
    System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +111
    System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +29
    System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
    Telerik.WebControls.GridTableView.PerformSelect() +23
    System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
    Telerik.WebControls.GridTableView.DataBind() +318
    Telerik.WebControls.RadGrid.DataBind() +142
    System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
    System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69
    System.Web.UI.Control.EnsureChildControls() +87
    System.Web.UI.Control.PreRenderRecursiveInternal() +50
    System.Web.UI.Control.PreRenderRecursiveInternal() +170
    System.Web.UI.Control.PreRenderRecursiveInternal() +170
    System.Web.UI.Control.PreRenderRecursiveInternal() +170
    System.Web.UI.Control.PreRenderRecursiveInternal() +170
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
  • Tsvetomir Tsonev 19 Oct
    @Richard - We're also working to reduce the JavaScript size as well. The results are not as dramatic, but they somewhat offset the code required for new features.

    We'll also provide CDN support after the Q3 release and this will improve loading times for public sites.

    @Jeff - The stack trace indicates that you're using RadGrid from RadControls Classic. Please, open a support ticket and we'll try to resolve the issue.
  • What's the timeline for CDN support? Particularly in EMEA? I need dates. Microsoft's CDN is up and running with JQuery and ASP.NET AJAX core JS so will Telerik just build on top of that? I have a call into my account rep (Harry) but he's on vacation and this is a burning issue. We are still on 2008 Q2, is there anything we can do in the interim? Thanks,
    -fs

Add comment

  1. Formatting options
       
     
     
     
     
       
  2. (optional, emails won't be shown on public pages)
  3. (optional)