Xcode 7.2: Editing Attributed UILabels in IB Hangs Xcode

Originator:sethfri
Number:rdar://24652436 Date Originated:2/15/2016
Status:Duplicate/15867816/Closed Resolved:No
Product:Developer Tools Product Version:7.2 (7C1002)
Classification:Crash/Hang/Data Loss Reproducible:Always
 
Summary:
After changing a UILabel to be attributed instead of plain in IB, the performance of the inspector degrades significantly, often causing the main thread in Xcode to be unresponsive for several seconds. This happens over and over again if you take any action within the label’s inspector, including just scrolling the inspector to view all of the properties.

Steps to Reproduce:
1. Create a storyboard
2. Create a view controller
3. Add a UILabel to it
4. Change the label to be attributed instead of just plain using the label’s inspector
5. Try to perform any other action in the inspector, including just scrolling the inspector or trying to change the text of the label while it is attributed. The UI is painfully slow.

NOTE: This is reproducible with a single UILabel, but it really starts to show its effects when you have multiple elements. I've added two attributed UILabels in the example project. Try changing the text of the labels, scrolling their inspectors, and switching back and forth between inspecting the two labels

Expected Results:
I expect a snappy UI whether the label is attributed or not.

Actual Results:
The inspector is perfectly snappy when the label is plain, but when it is attributed, it blocks the main thread considerably. Performance is awful.

Version:
Xcode 7.2 (7C1002)

Notes:


Configuration:
OS X El Cap 10.11.3

Attachments:
'Attributed Label Test.zip' was successfully uploaded.

Comments

Update from Me

Something else I just noticed is that the inspector actually shakes, especially when you open up the popover to edit the line height or paragraph spacing. I'm attaching a video demonstrating the slowness (though sometimes it's slower than the video) as well as the shakiness of the entire inspector. I presume the two are related.

'attributedLabelInspector.mov' was successfully uploaded.


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!