CGContextDrawImage/UIImage drawInRect is significantly slower under iOS 11 beta (1 - 3) than iOS 10.3.1

Number:rdar://33292050 Date Originated:7/13/17
Status:Open Resolved:
Product:iOS Product Version:11
Classification:Performance Bug Reproducible:Yes
Core Graphics

When doing any operation that's drawing an image, within a rect, either by way of CGContextDrawImage or UIImage drawInRect, the operation takes over 1 second under any of the iOS 11 betas that have been released to date. Under iOS 10.3.1 these operations take under .01 seconds to complete.

Steps to Reproduce:
When running the following code with any given "tileImage":

 UIGraphicsBeginImageContextWithOptions(contextSize, YES, 1.0);

// use this
CGContextDrawImage(UIGraphicsGetCurrentContext(), drawInRect, _tileImage.CGImage);
//   or this         [_tileImage drawInRect:drawInRect blendMode:kCGBlendModeNormal alpha:1.0];

 _tileImage = UIGraphicsGetImageFromCurrentImageContext();

When run under iOS 10.3.1 this operation executes in less than .01 seconds. When the same code is run on any of the released iOS 11 betas this operation takes more than a second to execute. This is reproducible in the simulator or on a device.

Expected Results:
That the CGContextDrawImage or UIImage drawInRect operations execute within a similar timeframe on iOS 11 as they do under iOS 10.

Observed Results:
There is a significant decrease in performance under iOS 11

iOS beta 1, 2 or 3


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!