Performance of UITableView - NSAttributedString in UITableViewCell

Hi there!


I want to know some tips that other developers may have experienced with using NSAttributedString on a UILabel inside a UITableViewCell.

For our app, I have 2 UIImageView instances and 1 UILabel. I have commented out the section of my code where it downloads the images asynchronously from the web. Even without loading the images, the scrolling performance seems to be slow with the UILabel with an attributed string set on it.


The NSAttributedString that I set will always have the same attributes (e.g., username will have the same font size, weight and color, etc.). However, the string themselves will have different values set to them.


In tableView:cellForRowAtIndexPath: that's where I set the attributed string. With my examination of my app using Instruments with the Time Profiler module, it spends some time in the setAttributedText: where I do the setting of the string with entirely different values but the same attributes.


Can anyone point me to the right direction as to know the best way to optimize the scrolling performance with NSAttributedString on a UITableViewCell.


Thank you!

Replies

After 4 years, still the same issue....