Infragistics WPF XamDataGrid, XamDataChart High Performance Scenarios

[Infragistics] Kiril Matev / Saturday, December 11, 2010

When you’re dealing with real-time or large volumes of data, the three most critical factors for the user experience of your application are performance, performance and…performance. Customers are often interested in what’s the performance of the XamDataGrid (the grid component in our NetAdvantage for WPF Line of Business product – free trial available) and XamDataChart (the fast chart component featuring zooming and panning in our NetAdvantage for WPF Data Visualization product – free trial available). Rather than just say “well, they’re capable of handling millisecond-based updates without noticeable delay in rendering, and are in use at mission-critical applications handling real-time and high-volume data”, I built a sample showing XamDataGrid and XamDataChart in high-performance scenarios, so you won’t have to just take my word for it, but also see it for yourself. This can also serve as a proof-of-concept project you can use during your evaluation of our product, so you can experience its performance without having to invest any time learning how to use it.

Please download the sample code here. It includes all the Infragistics libraries you need to build it – trial libraries from our latest 10.3 release. You will need Visual Studio 2010 to build and run this sample.

Let's take a look at the scenarios included in these high-performance samples, describing how you can interact with each one to demonstrate the components capabilities.

XamDataChart real-time data scenario

This scenario shows the XamDataChart bound to a real-time data feed. You can start or stop the real-time data feed by clicking the Start/Stop Timer button, and can modify the speed of data update and the amount of data displayed in the chart control using the two sliders above. You can see the time it takes to layout the points in the chart in the label above it, just so you can get an idea of how fast the XamDataChart really is.

By default the update speed has been set to 30ms, resulting in 33 points added to each series in the chart per second. By default data for the last 5 seconds is displayed on screen.

Please feel free to modify the code in order to test scenarios different from the ones implemented.

Something worth noticing is that zooming and panning functionality remain functional at such a high-speed refresh rate both using the zoombars and the chart area.

XamDataChart high-volume data scenario

The XamDataChart high-volume data scenario allows the user to set the number of points to be bound to the chart control. By default, this value is 100,000, which would fit more than a year’s worth of data readings taken each second, but feel free to increase that according to the requirements your scenario. Click the Bind Chart button to bind this data to the chart, displaying four line series, displaying exactly 400,000 points. Please try the zooming and panning using the mouse and zoombars to see the level of performance this component delivers when bound to such a high-volume dataset.

XamDataGrid high-performance scenarios

The XamDataGrid high performance tab covers both high-volume and real-time change scenarios. Each record is composed of 59 columns, including numeric, string and date-time columns, allowing the users to see the grid’s performance with a large number of columns and a variety of data types.


XamDataGrid high-volume scenario

Clicking the Bind 20K records button generates and binds 20,000 records to the grid. The status row just below the buttons displays the time it has taken to generate and bind the records, as well as the time it took to layout the XamDataGrid control. Having bound this data to the grid, note that scrolling is smooth both along the horizontal and vertical dimensions.

XamDataGrid real-time refresh scenario

Clicking the Start Real-Time feed button starts a timer, which adds 10 records each second, and modifies all records twice per second. You can modify the number of rows added per second by modifying the intervals of the timers in the XamDataGridHighPerformance.xaml.cs file.

Statistics regarding the performance of the XamDataGrid are updated once per second, displaying the number of records updated and the speed of adding new rows to the grid. In this scenario, please note that as multiple rows are added and modified per second, the scrolling remains smooth.

For more information on performance tuning the XamDataGrid, please see this blog post. I’ve provided comprehensive guidance and sample code which will help you get the most performance out of the XamDataGrid.

Summary

Please use this sample project to experience the performance that the XamDataGrid and XamDataChart deliver in high-volume or real-time scenarios. Modify the parameters of these scenarios in the code, and test your own high-performance scenarios. This will allow you to become more familiar with the type of performance you can expect from our grid and chart components, provide you with a point of reference as far as performance is concerned, and ultimately help you see how they can save you time and resources in your work.

Please let me know if you have any questions or comments about the performance capabilities of our controls. You can reach me at kmatev@infragistics.com