WinForms Charting – Data Binding Optimization and New Data Adapters (v21.1)

Series data binding optimization

Not long ago, memory consumption (for apps deployed on 32-bit machines) was a top priority for every developer. Though this is far less an issue today (as most new PCs have a decent amount of RAM and a 64-bit OS pre-installed), we continue to receive feedback from customers who encounter memory related issues for chart-intensive solutions.

As you may know, the 2GB memory pool limits the maximum number of points that can be processed by our WinForms Chart Control. Over the last few months, we discovered a way to increase the maximum number of points in bound mode by approx. 35%-45% (when compared to our previous version – v20.2) without changing input data source schema. 

Note that optimized binding method does not simplify the Series outline. If needed, you can also enable the corresponding option (Series.AllowResample). 

The following screenshot illustrates the difference in memory consumption for Series bound to a data source with 1M records. Results vary because these Series have various Series point values. For instance, the Candle Stick Series has four values per point, the Line Series has a single value per point, the Range Bar has two values per point and the Box Plot uses seven values for each point.

Thanks to our v21.1 optimizations, the maximum number of points that can be bound to our WinForms Chart control has significantly increased. Our test application running in x86 mode renders a Line Chart with approximately 20M input points without an OutOfMemory exception (compared to ~11M input points in v20.2). 

New Data Adapter API

In addition to optimized memory methods, v21.1 also includes a new data adapter API. Our new implementation reduces binding time for data sources with predefined schemas. The principal objective of the API is to encapsulate information about data source schema in a custom data adapter and avoid the overhead of the Reflection API and type boxing operations used in the standard binding method. 

The following screenshot illustrates the benefits of this approach. In a test with identical data sets (1M records bound via standard data binding vs our custom data adapter) performance gains vary from 11% (Box Plot) to 44% (Line Series).

Your Feedback

Once you upgrade to our most recent release (v21.1), you should notice a reduced memory footprint – without changing application source code. For predefined data sources, you can exploit the benefits of the new data adapter API and minimize the data loading time. If you already tested your existing charting modules with v21.1 and would like to provide feedback, feel free to comment below or contact us via the Support Center. We appreciate your continued support.

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.