Only call stroke when the whole bezier path has been created. Significant perfor…
…mance fix (charts with 1000 points take < 1 second rather than around 10 seconds)
Showing
1 changed file
with
1 additions
and
1 deletions
| @@ -135,11 +135,11 @@ | @@ -135,11 +135,11 @@ | ||
| 135 | [progressline addLineToPoint:CGPointMake(index * _xLabelWidth + 30.0+ _xLabelWidth /2.0, chartCavanHeight - grade * chartCavanHeight + 20.0)]; | 135 | [progressline addLineToPoint:CGPointMake(index * _xLabelWidth + 30.0+ _xLabelWidth /2.0, chartCavanHeight - grade * chartCavanHeight + 20.0)]; |
| 136 | [progressline moveToPoint:CGPointMake(index * _xLabelWidth + 30.0 + _xLabelWidth /2.0, chartCavanHeight - grade * chartCavanHeight + 20.0 )]; | 136 | [progressline moveToPoint:CGPointMake(index * _xLabelWidth + 30.0 + _xLabelWidth /2.0, chartCavanHeight - grade * chartCavanHeight + 20.0 )]; |
| 137 | 137 | ||
| 138 | - [progressline stroke]; | ||
| 139 | } | 138 | } |
| 140 | 139 | ||
| 141 | index += 1; | 140 | index += 1; |
| 142 | } | 141 | } |
| 142 | + [progressline stroke]; | ||
| 143 | 143 | ||
| 144 | _chartLine.path = progressline.CGPath; | 144 | _chartLine.path = progressline.CGPath; |
| 145 | if (_strokeColor) { | 145 | if (_strokeColor) { |
-
Please register or login to post a comment