Boost Speed and Memory with DevExpress ASPxGridView

With the release of Outlook 97, Microsoft introduced to the masses an entirely new way in which to deliver information to end-users within a grid control. Component vendors such as us then released components which allowed developers to build Windows® and ASP.NET applications that mimicked the capabilities of Outlook 97’s grid. Over the last 10+ years, countless individuals have come to rely on the grouping/sorting/summary computation capabilities of this new grid metaphor on the Windows and ASP.NET platforms.

The Power of an Outlook® Style Grid
The real strength of the Outlook style grid lies in its ability to organize information for the end-user and report on that information in an effective manner. In a traditional 2 dimensional grid, a user would not have the luxury to analyze the information displayed on screen. Assume for a moment that a grid is used to display sales information. Old style 2-D grids do not allow the user to group sales information by region and to better understand the data being presented to them. But when using an Outlook style grid, the user is free to group and summarize information by any column…giving them the productivity tools needed to get their job done instantly without generating complex sales reports.

Size Matters
The UI power available in an Outlook® Style grid, however, comes at a cost. That cost is dataset size. Large datasets in an ASP.NET and Windows Forms application impact the usability of the application. When it comes to this modern grid UI, users will invariably want to analyze information and they will rarely understand why a grid performs well with a 100 records and fails with 100,000 records. To illustrate, let’s continue with our previous example. Assume a developer builds a web or Windows UI that displays sales data within a grid control and during testing with 100 sales records, the web server (or Windows client machine) and the components used to build the application perform admirably. The developer then delivers the solution to market and the customer is elated by the new UI.

As the customer begins adding information to the database and the dataset size grows, problems take shape. Grouping, summary computation, sorting, and navigation speed start to bog down. The problem worsens over time and eventually the developer is left with only a single option – to restrict the number of records being rendered on screen.

The developer then delivers a modified solution to the customer and the customer asks a very logical question…Why am I not able to group and summarize sales information for my business over the last year? So what if my database has 500,000 records in it? Why can’t I just see the information on screen without having to wait 2 minutes to get incorrect results?

Compromise is Not the Answer
Outlook style grids are extremely powerful but this power can only be realized if the grid control can consume data effectively. If this is not true…if the grid should only be used to display limited datasets, then why bother using an Outlook style grid?

When we chose to write our ASP.NET and Windows Forms grid, foremost in our minds was performance and optimum memory use against large datasets. Our reasoning was simple – whether a grid displays 1 record or a million, the server and client should respond instantly and give the end-user the means with which to operate his business without unwanted roadblocks and hurdles.

Let the Database Server Do What it Does Best
No matter how well one designs a data processing engine, it will never do its job well if one fails to recognize that database specific operations ought to be executed on the database server. No matter how ingenious the algorithms – no matter how brilliant the technology…if the grid is forced to manage data itself, you can bet that a large dataset will eventually bring the web server or the Windows client to its knees and make the application totally unusable.

Don’t Kill the Web Server and Windows Client
The obvious question one might ask at this point is why – why should a large dataset, hundreds of users, and the need to group/sort/navigate records throughout the business day impact the application in such a massive way. The answer is simple: With ASP.NET and Windows, most grid controls need the entire dataset to be loaded and processed for every operation…be it a trivial operation such as record navigation from one page to the next or complex operations such as data grouping. Yes, it’s the web server that is forced into this position by competing grid controls and it is the web server and or Windows client that has to allocate the necessary resources to keep the application running.

At the end of the day, that’s why developers resort to filtering result sets – they need the web server or Windows client to function and not fail.

Enough with Crippling Limitations
The new ASPxGridView and XtraGrid Suite confront the limitations we’ve outlined head-on and have been engineered to free you from the hassles you otherwise would be forced to workaround.

Instead of reading the entire dataset from the data server and then managing data within the grid, the ASPxGridView and XtraGrid Suite simply display data that has already been grouped or sorted on the data server. This is possible because of our specially designed data provider included within the suites. This provider can produce smart queries so that all the grid needs to do is download records to be displayed within the current page. If you have 100,000 records in your data source and want to display 10 records on the page, the grid will need to download only 10 records rather than the 100,000 records required with each postback or callback when using competing grid controls. This means that with the ASPxGridView or XtraGrid Suite, what was once simply impossible with competing grids (but entirely needed by end-users) can now be easily accomplished.

Figure 1

See it for Yourself
You don’t have to take our word for it. To see how all of this works, review our online 300,000 Records demo and compare results with your current ASP.NET grid control.

Figure 2

Seeing is Believing
For a detailed tutorial and explanation of the mechanics involved, please review the following video


Reproduced with permission from DevExpress

One Response

Leave a Comment