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

后端 未结 3 1871
走了就别回头了
走了就别回头了 2021-01-07 11:40

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

相关标签:
3条回答
  • 2021-01-07 11:50
    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;
      
    0 讨论(0)
  • 2021-01-07 11:52

    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

    0 讨论(0)
  • 2021-01-07 12:11

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

    0 讨论(0)
提交回复
热议问题