This avoids blocking Xcode for too long if a large change comes into
the Xcode console. The parsing is done synchronously on the main
thread (as before) if the log change is smaller than 2000 characters,
otherwise it is put onto a dispatch queue for processing. Any
links found that way are then batched and queued for update on
the main thread.
The call to set the attributes is also changed so that it is
wrapped in beginEditing / endEditing to reduce the number of
change notifications that go out, and instead of three calls
to addAttribute it's one call to addAttributes.
This cset also includes a small debugging function, DLog, which
is disabled by default.
This avoids blocking Xcode for too long if a large change comes into the Xcode console. The parsing is done synchronously on the main thread (as before) if the log change is smaller than 2000 characters, otherwise it is put onto a dispatch queue for processing. Any links found that way are then batched and queued for update on the main thread.
The call to set the attributes is also changed so that it is wrapped in beginEditing / endEditing to reduce the number of change notifications that go out, and instead of three calls to addAttribute it's one call to addAttributes.
This cset also includes a small debugging function, DLog, which is disabled by default.