Dismissing a non-animated UIViewController from an embed UITableView by a cell-selected action causing performance issue(seems to be delayed more than 200ms) sometimes

Number:rdar://FB7531120 Date Originated:Jan 11, 2020 at 11:01 PM
Status:Open Resolved:No
Product:iOS SDK Product Version:12&13
Classification:UIKit Reproducible:Yes
When dismissing a presented UIViewController from an embed UITableView by selecting the cell without any animation(animated:false), I believe usually it causes under 50ms but sometimes(1~2 out of 10 times) it will cause more than 200ms so that user can feel the performance impact(an obvious delay). The testing project and the log is uploaded below.

Test Environment:
* macOS 10.14.6
* iOS 12 & 13
* Xcode 11.3(11C29)

Steps to Reproduce: (from testing project)
1. Run the app
2. Tap 'Button' button
3. Tap any cell from the presented UITableView(which is actually embed in a UIViewController)
4. The presented UIViewController is dismissed

Expected Results:
in step 4, the UIViewController is dismissed within 50ms(as usual) every time and no obvious performance delay/lag(?) happens

Actual Results:
in step 4, 1~2 out of 10 times(10%~20% chance) the UIViewController is dismissed by more than 200ms and user can feel an obvious performance delay/lag

the testing project is below:


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!