View-based table view scroll speed degrades using Auto Layout with cell subviews
| Originator: | lithium3141 | ||
| Number: | rdar://13485452 | Date Originated: | 22-Mar-2013 11:36 AM |
| Status: | Open | Resolved: | |
| Product: | OS X SDK | Product Version: | Xcode 4.6.1 (4H512)/Mac OS X 10.8.3 (12D78) |
| Classification: | Performance | Reproducible: | Always |
22-Mar-2013 11:36 AM Tim Ekl: Summary: When using a view-based table view, adding several (~20) subviews to each table cell view and managing their positions using Auto Layout causes scroll performance to degrade noticeably. Steps to Reproduce: 1. Create an app using a view-based NSTableView. Ensure the table view has at least a few hundred rows. 2. Programmatically add 25 subviews to each table cell view. 3. Add NSLayoutConstraint instances to each table cell view to constrain those subviews' positions. 4. Run the app and scroll quickly through the table view. Expected Results: The visible scrolling effect is smooth and responsive. Actual Results: The scrolling jumps several dozen rows at a time, lending a "choppy" feel to the table view as it scrolls. Regression: Unknown. Notes: I have attached a sample application that, in its submitted form, demonstrates the baseline behavior (setting each subview's position by its frame). To see the performance degradation, change the definition of USE_AUTO_LAYOUT in ALSTConstants.h to 1, then rebuild and rerun the application. 22-Mar-2013 11:36 AM Tim Ekl: 'AutoLayoutScrollTest.zip' was successfully uploaded
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!