Memory usage Shinobi Charts iOS


#1

Hi Shinobi Team,

i have a few questions concerning memory usage:

I monitored the following memory behaviour. Before i open a chart in my application, the application has 10mb of live data. After opening a full screen pie chart the application uses 51mb and i can track down around 20mb of that 40 to the drawRect method of SChartRenderView. After leaving the view again (going back in the navigation controller) my app goes back to 30mb of live data. As there are still 20 mb reserved after i leave the view i am wondering myself if the system keeps some open gl memory or something reserved. Can you explain this behaviour ?

In this context i have another question:

In this link http://stackoverflow.com/questions/12603161/ios-6-mkmapview-crashes-on-eaglcontext-setcurrentcontext you can read that we need to do the following in the dealloc of a Shinobi Chart:

[self.canvas.glView removeFromSuperview];
 self.canvas.glView = nil; // force glView dealloc
 [EAGLContext setCurrentContext:nil];

Is this still necessary in the newest version and can this be connected to the memory issues ?

The thing about the memory usage that bothers us is that if we want to make a dashboard with multiple charts we run into serious memory problems.

Thanks for your feedback & help !


#2

Hi Shinobi Team,

i’d like to backup my question with a few screenshots:

  1. Memory usage with the application running (16mb live data)

  1. Memory after opening a dashboard with 6 charts

  1. Memory after leaving the dashboard (23 mb more than before entering it)

  1. Allocation Call Tree while opening the dashboard

I am not sure how reliable instruments are with open gl and how much of the memory might be buffered from system side but the memory usage seems a bit high to me. I am sure you have a lot of experience with this and i am looking forward for your feedback.

Best regards


#3

Shinobi Team, I am also have the problem above when implementing a combination of shinobi charts and grids in a 5 tab UITabBarController application. The memory foot print of the application is growing rapidily which ultimately causes the devices to close the application out once the devices is resources are no longer available. I would love to learn the best way to control the memory usuage of charts and grids in an ARC environment. Thank you for your support.


#4

Hi Tobi,

Apologies for the late reply.

Is there any chance you could send an example project that shows this memory issue to info@shinobicontrols.com?

This would really help us identify the source of your issue.

Also, you mentioned screenshots in your previous post and I don’t see any links any screenshots.

If you could accompany the example projects with those screenshots that would be very helpful.

Kind Regards,
Andrew Polkinghorn