iPhone开发:Core-Plot性能在处理大量数据时速度慢 [英] iPhone Development: Core-Plot performance Slow when handling a huge data

查看:123
本文介绍了iPhone开发:Core-Plot性能在处理大量数据时速度慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iPhone开发:处理大量数据时Core-Plot性能变慢。

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

我试图将500个数据放入Plot中。表现显示它真的很慢。

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

大部分CandleStick图表都混合在一起......

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

任何人都有解决方案吗?

Anyone has any solution for me, please?

推荐答案


  1. 请注意尺寸情节区域。如果您有比像素更多的数据点,请将数据集过滤为@benzado建议。

  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.

使用快速绘制的图形元素 - 不透明的颜色,不渐变,没有图像,没有阴影。如果条形图只有几个像素宽,则不要同时设置填充和边框线;使用任何一个绘制得更快。

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.

减少或消除无关的元素,如次要刻度线和网格线。

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

使用其中一种数据源方法,在一次调用中提供一组点,而不是一次一个。

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;


这篇关于iPhone开发:Core-Plot性能在处理大量数据时速度慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆