success jump One of the most used features of Telerik’s Grid for ASP.NET AJAX is grouping and for some time now we have been receiving feature requests from customers regarding grouping performance optimization. This task was not so easy, but after some months of research, implementation and a lot of headaches we finally succeeded with this complex challenge!

I want to introduce to you the new linq based grouping for Telerik’s Grid for ASP.NET AJAX which will be available in the Q3 2011 ajax release. The new grouping mechanism features incredible performance optimizations in scenarios with large data sources, containing thousands or millions of records. The power of the new grouping comes from a Dynamic LINQ library which makes the concept of querying data and enables efficiently to express queries in any programming language.
You can control the new grouping mechanism by setting the MasterTableView.EnableLinqGrouping property, which default value is "true". If you set it to "false" the old logic for grid grouping will be executed. However in this case you will lose all performance improvements of the new grouping implementation. But let's stop talking and see some tests. All performance tests shown below are performed on:
  • Processor: Inter(R) Core(TM)2 Quad CPU Q9400 @ 2.66GHz
  • RAM: 8.00 GB
  • System type: 64-bit
  • Windows 7 Enterprise
  • .NET 4.0
  • IIS 7
  • Version 2011.2.980 of Test Studio, Telerik’s solution for functional and performance testing. It is a powerful tool which helps you build automated tests for your web and desktop apps.
All times are measured in milliseconds and only the server side execution time is shown. Telerik’s ASP.NET AJAX Grid control is bound to database tables with 1000, 10 000, 100 000 and 1 000 000 rows. The grid is grouped by columns with different data types: int, string, decimal, int + string (grouped by two columns), int + string + decimal(grouped by three columns).

Advanced data-binding via the NeedDataSource event to custom objects

Advanced data-binding via the NeedDataSource event to 1 000 000 custom objects Advanced data-binding via the NeedDataSource event to 100 000 custom objects Advanced data-binding via the NeedDataSource event to 10 000 custom objects Advanced data-binding via the NeedDataSource event to 1000 custom objects

Advanced data-binding via the NeedDataSource event to DataTable

Advanced data-binding via the NeedDataSource event to DataTable with 1 000 000 rows Advanced data-binding via the NeedDataSource event to DataTable with 100 000 rows Advanced data-binding via the NeedDataSource event to DataTable with 10 000 rows Advanced data-binding via the NeedDataSource event to DataTable with 1000 rows

RadGrid bound to LinqDataSource control

RadGrid bound to LinqDataSource control: 1 000 000 rows RadGrid bound to LinqDataSource control: 100 000 rows RadGrid bound to LinqDataSource control: 10 000 rows RadGrid bound to LinqDataSource control: 1000 rows

RadGrid bound to EntityDataSource control

RadGrid bound to EntityDataSource control: 1 000 000 rows RadGrid bound to EntityDataSource control: 100 000 rows RadGrid bound to EntityDataSource control: 10 000 rows RadGrid bound to EntityDataSource control: 1000 rows

RadGrid bound to SqlDataSource control

RadGrid bound to SqlDataSource control: 1 000 000 rows RadGrid bound to SqlDataSource control: 100 000 rows RadGrid bound to SqlDataSource control: 10 000 rows RadGrid bound to SqlDataSource control: 1000 rows

So if the old and new grouping mechanisms were cars they will look like the following:

old grouping car

new grouping car

And who does not want to drive a new car model ?!

I will be happy to hear how you find the new super-charged grid grouping, hence do not hesitate to leave your comment.


About the Author

Radoslav Kirilov

is a software developer at one of Telerik’s ASP.NET AJAX teams. Ever since he joined the company in 2009, he has been working on the data-bound and date-picker controls. His interests are primarily concentrated on ASP.NET, AJAX, MVC, SQL and best practices.

Related Posts

Comments

Comments are disabled in preview mode.