SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Android Chart Performance: TLDR

In this post, we compare the performance of five of the major Android Charting Libraries vs. our own brand new & upcoming Android Chart: SciChart for Android. In order to conduct a fair comparison, we’ve developed a comparison application which generates several different chart types and measures refresh rate (FPS – Frames per Second) on each chart library.

Our findings were that:

  • AChartEngineGraphView and AndroidPlot had poor real-time performance for an Android Chart Library and were too slow for use in an App which required real-time updates.
  • MPAndroidChart had better performance and was suitable for some cases, e.g. when data updates were infrequent or number of points on the chart were less than a few thousand, but once dataset became larger (above a few thousand points), it also started to slow down.
  • One popular commercial Android Chart library was tested (labelled CompetitorA) which had comparable performance to MPAndroidChart.
  • Finally, the fastest Android Chart was SciChart for Android, which beat all available Android Chart Controls by by a wide margin.

At smaller datasets all the charts appeared fine, however once we increased the volume of data and rate of updating the Android Chart control, all of the above slowed down significantly except for SciChart. In some tests SciChart for Android registered between 2-5x faster than the nearest competitor, and in one, a staggering 255x faster.

For this reason we propose SciChart’s Android Chart as the best Android Chart Library where real-time updates, or visualisation of big-data is required.

How do we Measure Android Chart Performance?

To avoid uncorroborated statements, we’ve tried find out what the most popular Android Charts can offer in terms of speedf. To our big surprise, we haven’t found any performance analysis of the existing charting packages! And that in-spite of the fact that similar questions have been asked a lot at StackOverflow, Quora, etc.! Which means that this question is topical among the Android developer community.

So we’ve created an Android application which performs a comparison of different charting packages. It was designed to help evaluating their performance under different test conditions, ranging from mild to extreme. The following aspects were considered to be the most important for such analysis:

  • Whether a chart crashes under a test-case
  • Measuring FPS on the user interface when a chart is under test conditions
  • The initial launch time of a test
  • Rate of change of data
  • General visual smoothness and UI responsiveness

Who did We Compare Against?

We have compared the performance of Android Charts by SciChart against the most popular and renowned Android charting libraries, including:

  • AChartEngine, an open source charting software library for Android
  • MPAndroid, an open source, cross-platform chart library for Android and iOS
  • Competitor A, a popular commercial cross-platform Android and iOS charting software

We also had a look at

  • GraphView, an open source graph plotting library for Android
  • AndroidPlot, an open source Android library for creating charts

However due to time constraints, plus poor stability and performance of these libraries when large data was appended, we have omitted them from the results – for now.

The Test Setup

What Tests are Run?

There are four different test cases run in our Android Charts Performance Comparison app, under different conditions. They are designed to really really stress the chart, by having huge numbers of series, or points, or many updates per second, with varying thickness of pens / number of pixels filled.

Test 1: NxM Series Test

many_framed

In this test, N series of M points are appended to series, then the chart redraws (the same data) as fast as possible by just resizing the Y-Axis for 10 seconds per test.

The FPS is measured using the Choreographer class from the Android API.

Areas Stressed: Iterating Data Series, Coordinate Transformation and Drawing.

 

Test 2: Scatter Series Test

scatters_framed

In this test, N Scatter points (ellipses) are appended to a series, then the chart redraws. Immediately after, the points are updated in a Brownian motion fashion and the chart is drawn again.

The FPS is measured using the Choreographer class from the Android API.

Areas Stressed: Coordinate Transformation, Geometry Generation (Ellipse) and Drawing.

 

Test 3: FIFO (Scrolling) Series Test

Fifo_framed

In this test N points are appended to a series, but scrolled from right to left (as new points arrive, old are discarded). SciChart for Android has a built-in mode to handle this called Fifo data series which is implemented as a circular buffer. Other chart components you simply remove a point for each point added.

The FPS is measured using the Choreographer class from the Android API.

Areas Stressed: Copying Circular Buffers (FIFO Series), Resampling and Drawing, scrolling.

Test 4: Append Data Test

Append_framedIn this test N/3 points are appended to 3 series, then M points are appended between each draw of the chart. The data is random-walk but we vary noise to create more, or less noisy waves. This has the effect of stressing the actual drawing engine (when more noisy) vs. the update rate when less noisy.

The FPS is measured using the Choreographer class from the Android API.

Areas stressed: Appending Data, Resampling, Auto-Ranging and Drawing.

Test Hardware

We’ve used SciChart Android v.1.0 for this purpose and compared it with the other Android Charts on a number of devices and emulators, among these Samsung Galaxy S6 Edge and Google Nexus 4.

The Test Results

You can find the test results of our Android Chart Performance Comparison below. All test result numbers are in FPS (Frames per second – Higher is Better), meaning, the average number of redraws per second during the test, as measured by the Choreographer class from the Android API.

If a number is missed (blank), it means that a chart failed to run (crash) under a particular test-case.

The final column (SciChart Speedup) is the speed increase of SciChart Android vs. the other Android Charting Packages, e.g. 2.5 means 2.5x faster.

Performance report Sun Apr 24 14_30_50.xlsx - Excel 2016-06-21 19.22.08

Test Results in Chart Form

What Android charting performance comparison would be complete without the results in chart form?

You can find the test results plotted below:

Append Points Test Results

SciChart Android is green, results are FPS (Refresh rate) so higher is better.

AppendPerformance

Fifo Scrolling Test Results

SciChart Android is green, results are FPS (Refresh rate) so higher is better.

FifoPerformance

Scatter Series Test Results

SciChart Android is green, results are FPS (Refresh rate) so higher is better.

ScatterPerformance

NxM Series Test Results

SciChart Android is green, results are FPS (Refresh rate) so higher is better.

NxMPerformance

 

Performance Comparison Conclusions

According to the Performance Comparison Results, Most Android Chart libraries are unsuitable for real-time updates on the chart. Most perform poorly once the amount of data reaches a few thousand points.

By contrast, the Android Charts by SciChart are extremely fast and show robust performance across a number of test cases including scatter charts, scrolling line series, appending line series and multiple series.

 

SciChart should be considered a very strong contender when evaluating real-time Android Charting Libraries for use in either Android Apps or Embedded systems which run the Android operating system.

A version of the test-application is available on request, if you would like to contact us. For legal reasons we can’t publish the names of CompetitorA but if you believe you are that competitor and wish to verify the results or submit a modification to optimize your code, please feel free.

Finally let us know what you think in the comments! If there’s anything else you want us to test, please ask!

Best regards,
Yuriy, SciChart Team

Leave a Reply