NSAttributedString from HTML data: slow and main thread only

Originator:marco
Number:rdar://20973383 Date Originated:15/05/2015
Status:Open Resolved:
Product:iOS SDK Product Version:iOS 8.3
Classification: Reproducible:
 
Summary:
-[NSAttributedString initWithData:options:documentAttributes:error] is slow and can crash if used in a background thread

Steps to Reproduce:
See attached example project that shows the slowness and the possible crash
https://www.dropbox.com/sh/wnauco2dbzps3oq/AABEW1coTTyvyNsrBYB-7Q9va?dl=1

Expected Results:
1. Fast conversion of a HTML string to a NSAttributedString
2. Usable from every thread

Actual Results:
1. VERY slow
2. Can crash in a background thread (because WebKit)

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!