How Fast is SciChart’s iOS Chart?
Tags: webdev, javascript
Published: 2024-05-02 08:43:18

<h1>iOS Chart Performance Comparison</h1>
<div style="background-color: #f3f3f3; border: 1px solid #E3E3E3; padding: 20px 20px 0px 20px; margin-bottom: 20px;">
<h6><em>Updated: March 2019 with v2.5 / Metal Results</em></h6>
<i>Updated results for our iOS Chart Performance Comparison can be seen at the page <a href="https://www.scichart.com/ios-chart-metal-opengl-performance/">iOS Chart Performance: Metal vs. OpenGL</a>. </i>

</div>
In this post, we compare the performance of iOS Charting Libraries including open source iOS chart libraries as well as paid charts. Our goal is to demonstrate the performance comparison between well known iOS Chart libraries, and if you are looking for a feature comparison vs. open source charts, then <a href="https://scichart.com/comparison-of-scichart-vs-open-source-chart-controls/">please look no further than this article.</a>
<h2>Which iOS Chart Libraries do we compare?</h2>
In this article we compare the performance and big data capabilities of four of the main iOS Chart libraries. These are:
<ol>
 <li><strong><a href="https://github.com/core-plot" target="_blank" rel="noopener nofollow">Core plot</a>:</strong> a popular open source iOS Chart Library</li>
 <li><strong><a href="https://github.com/danielgindi/Charts" target="_blank" rel="noopener nofollow">Charts</a>: </strong>formerly 'iOS Charts', a Swift port of MPAndroidChart</li>
 <li><strong><a href="https://www.shinobicharts.com/" target="_blank" rel="noopener nofollow">Shinobi Charts</a>:</strong> a commercial iOS Chart Component</li>
 <li><strong><a href="https://www.www.scichart.com/ios-chart-features" target="_blank" rel="nofollow noopener">SciChart iOS:</a></strong> our own real-time iOS Chart Component.</li>
</ol>
<h2>What do we define as Big-Data?</h2>
<a href="https://abtsoftware-wpengine.netdna-ssl.com/wp-content/uploads/2017/08/iHealth-ios-case-study.pdf" target="_blank" rel="noopener"><img class="wp-image-15647 size-medium" src="https://www.scichart.com/wp-content/uploads/2017/08/white-ipad-mockup-ihealt-min-300x236.png" alt="Big Data in iOS Charts case study " width="300" height="236" /></a> <figcaption>Read a case study where a developer used iOS Charts to display 100,000 points from heart rate sensors.<figcaption>

Big-Data means tens of thousands to millions of points in a chart or graph. People are starting to create <a href="https://abtsoftware-wpengine.netdna-ssl.com/wp-content/uploads/2017/08/iHealth-ios-case-study.pdf">quite innovative apps which read data from heart-rate sensors</a>, or plot signals from <a href="https://abtsoftware-wpengine.netdna-ssl.com/wp-content/uploads/2017/08/Avicena-ios-case-study.pdf">many sensors or bluetooth devices simultaneously</a>, or even just plot lots of recordings from GPS data (running, cycling apps). As they push the envelope of what the iPhone / iPad devices can do, charts or graphs fast become a bottleneck.
<div style="clear: both;"></div>
<h2>What do we mean by Realtime iOS Charts?</h2>
<a href="https://abtsoftware-wpengine.netdna-ssl.com/wp-content/uploads/2017/07/broctagon-andoid-case-study1.pdf" target="_blank" rel="noopener"><img class="wp-image-15496 size-medium" src="https://www.scichart.com/wp-content/uploads/2017/07/broctagan-charting-case-study-1-300x153.png" alt="Streaming Updating Realtime iOS Charts case study" width="300" height="153" /></a> <figcaption>Read a case study where a customer created iOS &amp; Android trading apps with streaming updating charts</figcaption>

Real-Time iOS charts are charts which are dynamically updating. Another term for this is 'Streaming iOS charts'.

Realtime iOS Charts are required when data is being downloaded continuously from the web, or continuously pushed from bluetooth or wire-connected sensors.

In modern iOS apps it is becoming increasingly common to see realtime charts, apps such as <a href="https://abtsoftware-wpengine.netdna-ssl.com/wp-content/uploads/2017/08/Avicena-ios-case-study.pdf">heart rate monitors</a>, <a href="https://abtsoftware-wpengine.netdna-ssl.com/wp-content/uploads/2017/08/iHealth-ios-case-study.pdf">health &amp; fitness apps</a>, <a href="https://abtsoftware-wpengine.netdna-ssl.com/wp-content/uploads/2017/07/broctagon-andoid-case-study1.pdf">trading apps</a> and server or process monitoring apps. We compare the realtime performance of several iOS Chart libraries to show you which perform the best with streaming updates.
<div style="clear: both;"></div>
<h2 style="text-align: justify;">How to we measure iOS Chart Performance?</h2>
To carry out performance tests we've built a iOS Chart comparison application in Objective-C. This application performs a number of identical tests on the four chart providers: <a href="https://github.com/core-plot">Core Plot</a>, <a href="https://github.com/danielgindi/Charts">iOS Charts</a>, Shinobi and SciChart and outputs the results to a CSV file.

Results include refresh rate (FPS - Frames per Second) as well as CPU Usage and Startup Time for each iOS Chart test case. The tests are designed to really stress the chart control and find it’s limits.
<h2 style="text-align: left;">What Tests are Run</h2>
There are four different test cases run in our iOS 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.

A certain test is run, and FPS, or refresh rate, is measured via the <a href="https://developer.apple.com/library/ios/documentation/QuartzCore/Reference/CADisplayLink_ClassRef/" rel="nofollow">CADisplayLink</a>, which fires once after each drawing pass completes.
<h4>Test 1: NxM Series Test</h4>
<a href="https://www.scichart.com/wp-content/uploads/2016/06/ios-chart-core-plot-vs-scichart-nxm-performance-test.png" rel="prettyphoto"><img class="alignleft wp-image-15685 size-medium" src="https://www.scichart.com/wp-content/uploads/2016/06/ios-chart-core-plot-vs-scichart-nxm-performance-test-300x150.png" alt="iOS Charts Core Plot SciChart performance comparison NxM series test" width="300" height="150" /></a>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.

FPS is measured using the <a href="https://developer.apple.com/library/ios/documentation/QuartzCore/Reference/CADisplayLink_ClassRef/" rel="nofollow">CADisplayLink </a>, which fires once after each drawing pass completes.

<strong>Areas Stressed</strong>: Big-Data, many (hundreds of) series, many points per series.
<h4>Test 2: Scatter Series Test</h4>
<a href="https://www.scichart.com/wp-content/uploads/2016/06/ios-chart-core-plot-vs-scichart-scatter-performance-test.png" rel="prettyphoto"><img class="alignleft wp-image-15686 size-medium" src="https://www.scichart.com/wp-content/uploads/2016/06/ios-chart-core-plot-vs-scichart-scatter-performance-test-300x150.png" alt="iOS Charts Core Plot SciChart performance comparison scatter series test" width="300" height="150" /></a>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.

FPS is measured using the <a href="https://developer.apple.com/library/ios/documentation/QuartzCore/Reference/CADisplayLink_ClassRef/" rel="nofollow">CADisplayLink </a>, which fires once after each drawing pass completes.

<strong>Areas Stressed:</strong> Big-Data, updating scatter charts
<h4>Test 3: FIFO (Streaming) Series Test</h4>
<a href="https://www.scichart.com/wp-content/uploads/2016/06/ios-chart-core-plot-vs-scichart-streaming-performance-test.png" rel="prettyphoto"><img class="alignleft wp-image-15687 size-medium" src="https://www.scichart.com/wp-content/uploads/2016/06/ios-chart-core-plot-vs-scichart-streaming-performance-test-300x150.png" alt="iOS Charts Core Plot SciChart performance comparison FIFO Streaming series test" width="300" height="150" /></a>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 iOS &amp; 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.

FPS is measured using the <a href="https://developer.apple.com/library/ios/documentation/QuartzCore/Reference/CADisplayLink_ClassRef/" rel="nofollow">CADisplayLink </a>, which fires once after each drawing pass completes.

<strong>Areas Stressed:</strong> Streaming, scrolling charts. Big-data.
<h4>Test 4: Append Data Test</h4>
<a href="https://www.scichart.com/wp-content/uploads/2016/06/ios-chart-core-plot-vs-scichart-bigdata-performance-test.png" rel="prettyphoto"><img class="alignleft wp-image-15684 size-medium" src="https://www.scichart.com/wp-content/uploads/2016/06/ios-chart-core-plot-vs-scichart-bigdata-performance-test-300x150.png" alt="iOS Charts Core Plot SciChart performance comparison big-data append test" width="300" height="150" /></a>In this test N points are appended to a series, then M points are appended between each draw of the chart. The data is random-walk and the chart automatically zooms to fit when data is updated. This gives the appearance of a live streaming realtime chart.

FPS is measured using the <a href="https://developer.apple.com/library/ios/documentation/QuartzCore/Reference/CADisplayLink_ClassRef/" rel="nofollow">CADisplayLink </a>, which fires once after each drawing pass completes.

<strong>Areas stressed:</strong> Streaming, Realtime Charts. Big-Data.
<h4>Test Hardware</h4>
We’ve used SciChart iOS v2.0 for this purpose and compared it with the latest version of other iOS Charts on a number of devices. Test results are presented with the iPad 2017 (A9 processor, iOS 10).
<h2 id="ios-performance-results">The Test Results</h2>
You can find the test results of our iOS Chart Performance Comparison below. All test result <strong>numbers are in FPS</strong> (Frames per second – <strong>Higher is Better</strong>), meaning, the average number of redraws per second during the test, as measured by <a href="https://developer.apple.com/library/ios/documentation/QuartzCore/Reference/CADisplayLink_ClassRef/" rel="nofollow">CADisplayLink</a>.

Because many of the charts we tested became unstable as dataset size increased, we skip running further tests once a chart has dropped below 5FPS. That's why you see lots of zeros below. It means that this test has been skipped to avoid crashing or failing to run.

The final column (SciChart Speedup) is the speed increase of SciChart iOS vs. the other iOS Charting Packages, e.g. 11.52 means SciChart was 11.52x faster than the closest competitor for this test run.

<a href="https://www.scichart.com/wp-content/uploads/2016/06/ios-chart-comparison-performance-2017.png" rel="prettyphoto"><img class="alignnone wp-image-15654 size-full" title="iOS Chart Performance Test Results (FPS, Higher is Better)" src="https://www.scichart.com/wp-content/uploads/2016/06/ios-chart-comparison-performance-2017.png" alt="iOS Chart Performance Test Results (FPS, Higher is Better)" width="1151" height="1084" /></a> iOS Chart Performance Test Results (FPS, Higher is Better). In these tests SciChart is put head to head vs. CorePlot, iOS-Charts and Shinobi. In all tests, SciChart outperformed all competitors. In one test, SciChart was able to perform up to 18.54x faster than the closest competitor.
<h2>Test Results in Chart Form</h2>
What iOS charting performance comparison would be complete without the results in chart form?

You can find the test results plotted below:
<h4>NxM Series Test Results</h4>
<em>In this test SciChart is green and the results are FPS (Higher is better). </em>

<a href="https://www.scichart.com/wp-content/uploads/2016/06/iOS-Chart-Performance-Test-NxM-Series.png" rel="prettyphoto"><img class="alignnone wp-image-15688 size-full" src="https://www.scichart.com/wp-content/uploads/2016/06/iOS-Chart-Performance-Test-NxM-Series.png" alt="iOS Chart Performance Test: Core plot vs iOS Charts vs Shinobi vs SciChart. N Series x M points." width="1539" height="818" /></a>
<ul>
 <li>At lower series counts (10 series, 10 points) core plot is already starting to struggle, only able to refresh below 20 FPS. The others are doing well.</li>
 <li>At 33 series x 33 points now both Core plot and iOS Charts are struggling but Shinobi is still in the game.</li>
 <li>By 100 series x 100 points now only SciChart is rendering at a smooth rate (30 FPS or more)</li>
 <li>Above 200 series x 200 points and 500 series x 500 points only SciChart can complete the tests.</li>
</ul>
<h4>Scatter Series Test Results</h4>
<em>SciChart iOS is Green, results are FPS (Refresh rate) so higher is better.</em>

<a href="https://www.scichart.com/wp-content/uploads/2016/06/iOS-Chart-Performance-Test-Scatter-Series.png" rel="prettyphoto"><img class="alignnone wp-image-15689 size-full" src="https://www.scichart.com/wp-content/uploads/2016/06/iOS-Chart-Performance-Test-Scatter-Series.png" alt="iOS Chart Performance Test Core plot vs iOS Charts vs Shinobi vs SciChart Scatter Chart results" width="1539" height="818" /></a>
<ul>
 <li>For 100 scatter points, all four charts (Core plot, iOS Charts, Shinobi, SciChart) are responsive (above 30 FPS)</li>
 <li>For 300 scatter points, all four charts are still refreshing quickly (over approx 40 FPS)</li>
 <li>At 1,000 scatter points, Core plot and iOS Charts are suffering, managing just over 10 FPS. Shinobi is third with ~25 FPS</li>
 <li>At 10000 scatter points, SciChart is still able to render near 60 FPS but core plot and iOS Charts are unable to complete the test. Shinobi has dropped below 5 FPS and is disqualified form further tests.</li>
 <li>For 25,000 scatter points, 50,000 scatter points and 100,000 scatter points, SciChart is the only chart provider able to complete the tests.</li>
</ul>
<h4>Append Points Test Results</h4>
<em>SciChart iOS is Green, results are FPS (Refresh rate) so higher is better.</em>

<a href="https://www.scichart.com/wp-content/uploads/2016/06/iOS-Chart-Performance-Test-Append-Big-Data.png" rel="prettyphoto"><img class="alignnone wp-image-15690 size-full" src="https://www.scichart.com/wp-content/uploads/2016/06/iOS-Chart-Performance-Test-Append-Big-Data.png" alt="iOS Chart Performance Test: Core plot vs iOS Charts vs Shinobi vs SciChart Append Big Data test" width="1539" height="818" /></a>
<ul>
 <li>In this test we start off with 10,000 points on a chart. We then add 1k points each timer tick (10ms).</li>
 <li>For the first test Core plot, iOS Charts and Shinobi are all struggling, below 5 FPS. They are disqualified from further tests.</li>
 <li>SciChart renders above 35 FPS for the first six tests (up to 100k points + 1k new points per timer tick)</li>
 <li>SciChart is able to draw 100k points and 10k new points per timer tick at 15 FPS</li>
 <li>The last test 1 Million points + 10k new points per timer tick, SciChart is able to draw just under 10 FPS. Slow, but it handles it.</li>
</ul>
<h4>Fifo Scrolling Test Results</h4>
<em>SciChart iOS is green, results are FPS (Refresh rate) so higher is better.</em>

<a href="https://www.scichart.com/wp-content/uploads/2016/06/iOS-Chart-Performance-Test-Streaming-Scrolling-Realtime-Charts.png" rel="prettyphoto"><img class="alignnone wp-image-15691 size-full" src="https://www.scichart.com/wp-content/uploads/2016/06/iOS-Chart-Performance-Test-Streaming-Scrolling-Realtime-Charts.png" alt="iOS Chart Performance Core plot vs iOS Charts vs Shinobi vs SciChart Streaming scrolling realtime charts test" width="1538" height="813" /></a>
<ul>
 <li>In this test we start off with 1000 points and we attempt to scroll the chart (add one point, remove one point)</li>
 <li>For test #1 Coreplot is off to a rough start, struggling at under 10 FPS. iOS Charts is copying very well at 60 FPS along with SciChart, and Shinobi is posting just over 20 FPS.</li>
 <li>For the second set of tests 5k points scrolling point by point, iOS Charts performance has dropped significantly to 14 FPS. Shinobi is under 10. SciChart remains near 50 FPS.</li>
 <li>For the third set of tests at 10k points SciChart is the only contender left.</li>
 <li>Two further tests at 100k points and 1Million points are performed. SciChart is the only chart able to draw this amount of data.</li>
</ul>
SciChart suffers a bit with wider strokes. We noticed that from 1 stroke thickness to 10 stroke thickness there's an approximate 50% performance drop. It's still capable of drawing huge datasets though in excess of other charts.
<h2>Performance Comparison Conclusions</h2>
According to the Performance Comparison Results, Most iOS Chart libraries are unsuitable for real-time updates on the chart. Most perform poorly once the amount of data reaches a few thousand points.

<strong>4th: Core plot performance</strong>

Core plot was unable to compete most performance tests. For the line series tests, only showing 10 series with 10 points per series caused Core-plot to stutter, averaging under 20 FPS. For the scatter chart tests Core plot will display a few hundred data-points comfortably but not more. Core plot was not able to handle 1,000 data-points streaming without significant slowdown.

<strong>3rd: iOS Charts Performance</strong>

Charts came third in our tests, performing well for streaming (scrolling) 1,000 points on a line chart, but poorly in almost every other test. We observed that Charts would display a few thousand points in a static chart but as soon as you change the axis range, zoom or update data, it would stall and did not perform well. In some cases the chart would flicker or go completely blank while updating.

<strong>2nd: Shinobi Charts</strong>

Shinobi iOS Charts performed better in performance tests, however still struggled under the following conditions:
<ul>
 <li>More than 1,000 scatter points (FPS dropped below 30)</li>
 <li>More than 100 series with 100 points per series (FPS: 15)</li>
 <li>More than 1,000 points streaming (scrolling) chart (FPS 21)</li>
 <li>Appending 1,000 points to an existing series (FPS: 2)</li>
</ul>
<strong>1st: SciChart iOS Charts</strong>

SciChart is the clear winner in the performance tests. Test results showed SciChart outperforming competitors with refresh rates up to 10-20x faster(1), and able to show up to 200x more data(2).
<ol>
 <li>For realtime updates, SciChart outperformed the nearest competitor by up to 20x (FPS)</li>
 <li>For the FIFO streaming test, SciChart was able to scroll / stream 1 Million points whereas the nearest competitor topped out at 5,000 (200x more data)</li>
</ol>
<blockquote>
<p style="text-align: left;"><strong>Conclusion: SciChart is the Fastest chart available for iOS Apps which require big-data, or streaming, realtime updates. </strong></p>
</blockquote>
A version of the test-application is available on request, if you would like to <a href="https://www.scichart.com/contact-us/">contact us</a>. If you are one of the authors of chart components mentioned in this article and wish to verify the results or submit a modification to optimize your code, please feel free. We would also welcome submissions from other chart vendors and authors.

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

Best regards,
Yaroslav,
SciChart Team