The syntax highlighter can be speed up more by generating the finders only once when syntaxHighlightJavascript is called, not per line.
Created attachment 22730 [details] Proposed patch (ignoring whitespace changes)
Created attachment 22731 [details] Proposed patch (full patch)
Comment on attachment 22730 [details] Proposed patch (ignoring whitespace changes) + Removed, factoeed into syntaxHighlightJavascript as an inline function. Typo: factoeed - var findSingleLineString = generateFinder(/^"(?:[^"\\]|\\.)*"|^'([^'\\]|\\.)*'/, 0, "webkit-javascript-string"); + var findSingleLineString = generateFinder(/^"(?:[^"\\]|\\.)*"|^'([^'\\]|\\.)*'/, 0, "webkit-javascript-string"); // " Why this change? r=me
(In reply to comment #3) > (From update of attachment 22730 [details] [edit]) > - var findSingleLineString = > generateFinder(/^"(?:[^"\\]|\\.)*"|^'([^'\\]|\\.)*'/, 0, > "webkit-javascript-string"); > + var findSingleLineString = > generateFinder(/^"(?:[^"\\]|\\.)*"|^'([^'\\]|\\.)*'/, 0, > "webkit-javascript-string"); // " > > Why this change? Needed to keep Xcode's syntax highlighting sane. I added some words to that comment.
Landed in r35669.