drawViewHierarchyInRect performance is poor on iPhone X with iOS 12

Originator:sam.lievesley
Number:rdar://45225596 Date Originated:12/10/2018
Status:duplicate of 44806945 Resolved:No
Product:UIKit Product Version:iOS 12+
Classification:Bug Reproducible:100%
 
Area:
UIKit

Summary:

The method:
[view drawViewHierarchyInRect:frame afterScreenUpdates:NO];

performs poorly on the iPhone X with iOS 12. This is a regression since we did not observe this issue with iOS 11.

Steps to Reproduce:

Call the method:
[view drawViewHierarchyInRect:frame afterScreenUpdates:NO];

to render every frame (15 FPS)



Expected Results:

Performance of the drawViewHierarchyInRect should not be worse in iOS 12 than in iOS 11 on the iPhone X.


Actual Results:

For the same sized view 800 x 480 the method
[view drawViewHierarchyInRect:frame afterScreenUpdates:NO]
takes 300ms longer on the iPhone X than the iPhone 6s+

iPhone X with iOS 12:
2018-10-12 14:19:47.332431+0200 TomTom[2119:460864] size = {800, 480}, time1 = 0 ms, time2 = 0 ms, time3 = 371 ms, time4 = 371 ms
2018-10-12 14:19:47.691679+0200 TomTom[2119:460864] size = {800, 480}, time1 = 0 ms, time2 = 0 ms, time3 = 357 ms, time4 = 357 ms
2018-10-12 14:19:48.052285+0200 TomTom[2119:460864] size = {800, 480}, time1 = 0 ms, time2 = 1 ms, time3 = 360 ms, time4 = 360 ms

iPhone 6s+ with iOS 12:
2018-10-12 13:25:36.165425+0200 TomTom[1250:434003] size = {800, 480}, time1 = 0 ms, time2 = 0 ms, time3 = 62 ms, time4 = 62 ms
2018-10-12 13:25:36.230865+0200 TomTom[1250:434003] size = {800, 480}, time1 = 0 ms, time2 = 1 ms, time3 = 64 ms, time4 = 64 ms
2018-10-12 13:25:36.294131+0200 TomTom[1250:434003] size = {800, 480}, time1 = 0 ms, time2 = 1 ms, time3 = 62 ms, time4 = 62 ms


Version/Build:

iOS 12.0 (16A366)
iOS 12.1

Configuration:

iPhone X with iOS 12.0
iPhone X with iOS 12.1
iPhone 7 with iOS 12.1

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com 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!