If nobody objects, could someone commit this?
Ryan
On Nov 29, 2006, at 6:00 PM, Ryan Brown wrote:
Attached is a simple patch that improves syntax highlighting
performance. Opening a large .sc file (6500 lines) previously took
about 10 seconds of beach balling, with the patch it opens instantly.
It works by changing the text color via textStorage (rather than the
text view) and wrapping the entire colorization loop in beginEditing
and endEditing calls. Why this improves performance is documented
here:
http://developer.apple.com/documentation/Cocoa/Conceptual/
TextEditing/Tasks/BatchEditing.html
I also cleaned up the code a bit.
Ryan
<syntaxColorize.M.patch>