iPhone Development: Core-Plot performance Slow when handling a huge data

三世轮回 提交于 2019-12-09 02:02:26

问题


iPhone Development: Core-Plot performance slow when handling a huge data.

I tried to put 500 Data into Plot. The performance show that it is really slow.

And most of the CandleStick Chart all mix together...

Anyone has any solution for me, please?


回答1:


  1. Be aware of the size of the plot area. If you have more data points than pixels, filter the data set as @benzado suggested.

  2. Use graphical elements that are fast to draw--opaque colors, no gradients, no images, no shadows. If the bars are only going to be a few pixels wide, don't set both the fill and border line; use whichever one draws faster.

  3. Reduce or eliminate extraneous elements like minor tick marks and grid lines.

  4. Use one of the datasource methods that provide a group of points in one call rather than one at a time.

    -(NSArray *)numbersForPlot:(CPTPlot *)plot field:(NSUInteger)fieldEnum recordIndexRange:(NSRange)indexRange;
    -(double *)doublesForPlot:(CPTPlot *)plot field:(NSUInteger)fieldEnum recordIndexRange:(NSRange)indexRange;
    -(CPTNumericData *)dataForPlot:(CPTPlot *)plot field:(NSUInteger)fieldEnum recordIndexRange:(NSRange)indexRange;
    



回答2:


Plot a sample of your data! Don't plot all 500 data points if you don't actually need to draw them all.




回答3:


We did some speed comparisons of iOS Charts and one of them was Core-plot. Unfortunately Core-plot was so slow it could not do the first test!!

There were other chart components which were able to handle big data much more efficiently.

The test results and test setup are here: https://www.scichart.com/ios-chart-performance-comparison

In table format the results of a comparison between four main chart iOS providers can be found here.

Disclosure, I am the tech lead of the SciChart project



来源:https://stackoverflow.com/questions/9224336/iphone-development-core-plot-performance-slow-when-handling-a-huge-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!