A performance doubt


Hi to all,

I’m using a chart that has only a scatter of 80K points. Panning/zooming is ok, problems arise when I try to filter the datasouce. For example, due to a user selection, I go from 80K points to 1K and then to 80K again. Moving to higher number of points seems quite slow to me (> 3 seconds).

I tried to filter using two different strategies but with the same result:

  1. reloadData

  2. creating more scatterplots, one as every filter combination and showing/hiding series as the filter avoiding the data reload. (number of scatterplot increases, is it a problem?)

So I’m asking: what can I do to improve performances? I don’t want to reduce number of points, since aim of app is to show every element of dataset and do filtering to better understand data. Can I use a different glyph for datapoint that improves performances?

Thank you for your time.


Hi Trapo,

The more datapoints you have on a chart, the longer it will take to load the data - there isn’t really a way around this. Every time you reload the chart’s data, the chart must perform a series of calculations on the supplied data set.

The way around this that I would suggest, is exactly what you say in your second suggestion. You would have a delay on your initial load (which is unavoidable), but hiding and showing series should be instantaneous. What kind of redraw times are you seeing when hiding & showing your series?

One tip, to help with the delay of the initial load, could be to enable our background loading feature so your UI doesn’t lock up:

@property (nonatomic, assign) BOOL loadDataInBackground

This should enable an activity indicator and give your user some feedback that something is actually happening.



Hi Jan,

when I wrote the post, I was using simulator, now that I’m trying on physical device, second solution seems quite better. Since initial load is slow, and as you say, there’s not so much we can do, I want to try loadDataInBackground. I did not find in where I thought it could be (ShinobiChart, SChartSeries, SChartDatasource), where is it?

Thank you again for your time.


Hi Trapo,

Sorry if I wasn’t specific - the propery loadDataInBackground is a property on ShinobiChart. Make sure you are using an up to date version of ShinobiCharts as this feature was added relatively recently.



I upgraded library, and found the method. Thanks. However now I’m stucked with a bigger problem. See my next post.