WPF Charting - Large Data Source Processing (v20.1 - CTP)

Introduction

Over the last year, we’ve improved our WPF Chart control’s rendering methods to address a series of customer requests. One of our top priorities was to retain built-in functionality and avoid major API changes so everyone could benefit from new features without major changes to application code.

As you may know, we introduced a new DirectX surface rendering mode last year (WPF Charting – New Rendering Mode (v19.1, experimental). Last Fall, we optimized Chart layout rendering speed for fast real-time updates (Real-time Charting (WPF) - Rendering performance enhancements (19.2). These enhancements allowed us to retain high FPS rates when visualizing up to 100K points.

Of course, another important aspect of data visualization is efficient memory management. Take an app that measures/tracks sensor data – in such usage scenarios, an app can easily be asked to track/visualize millions of input values. Regardless of rendering speed, improved memory management will be necessary to deliver optimum results in these scenarios.

Prior to this release, our WPF Chart control used a legacy data processing model wherein the amount of allocated RAM was driven by data source collection size. This certainly limited the efficiency of our Chart control against extremely large data sources.

This issue forced our hand and with v20.1, we’ve taken the necessary steps to address it.

New Data Processing Mode

v20.1 ships with a new data processing mode (AllowResample) – one that minimizes the Chart control’s memory footprint and keeps it constant. With this update, our WPF Chart control limits processing to current viewport data and uses a smart visualization (resampling) algorithm for faster rendering. Based on internal tests, this makes it possible to process up to 50 million points.

The new data processing mode supports DateTime and Numeric scales and sorted data source collections. You will find a complete list of supported Series types in the following help topic: Automatic Resampling.

Test Results

The following chart summarizes internal test results. We tested the following use cases:

  • Data load time
  • Memory consumption
  • Interactivity (zoom and scroll operations)

We used sample data sets ranging from one thousand to two million points (mapped to X-Axis).

All charts below except the second one use a millisecond Y-Axis scale.

Data Loading time

When the new data processing mode is activated (Blue Series), data load time increases at a moderate pace, whereas our previous data processing (Orange Series) engine demonstrates exponential growth.

Memory Consumption

The memory allocated by the Chart control’s new data processing mode (Blue Series) stays at relatively the same level throughout – regardless of input data collection size. As you can see, our old data processing engine allocates much more memory (Orange Series).

Interactivity – Zoom Operations

This graph displays UI thread delays during zoom operations in milliseconds (our test case includes five zoom operations).

Though the delay between our new (Blue Series) and old (Orange Series) data processing engine is minimal at fewer points, the old data processing mode causes more delays when using more than 300K points.

Interactivity – Scroll Operations

You can see that the new data processing mode (Blue Series) is slower than our old (Orange Series) engine. This occurs because the old data mode uses preprocessed (cached) data, while the new mode reads data as the viewport changes. We are currently working on a solution to address this and minimize the difference between old and new.

Feedback

AllowResample is not currently enabled by default. We are still working to fine-tune our new algorithms. We also need to increase Series compatibility and to deliver similar data processing capabilities for our WinForms Chart control.

If you have enabled this new option in an existing project 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.