Very bad performance for small UIViewControllerPreviewing.sourceRect

Originator:an00na
Number:rdar://35883989 Date Originated:December 6 2017, 11:50 AM
Status:Open Resolved:
Product:iOS + SDK Product Version:11.2
Classification:Performance Reproducible:Always
 
Area:
UIKit

Summary:
When UIViewControllerPreviewing.sourceRect is small popping previewing view controller is very slow.

It's a regression on iOS 11. It worked fine on iOS 10.

Steps to Reproduce:
1. Launch sample app on an iOS device that supports 3D Touch. If possible use an iPhone X because I feel this issue is more severe on iPhone X.
2. 3D touch the pink rectangle whose I deliberately set very small to make the issue more obvious.
3. Watch the slow peeking.

Code: https://mega.nz/#!EaoxgBiJ!GTQG22O9DdR_FRjwFetvPa_9tO2O4uQFGkCeVpL-5n0

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!