scala/scala — pull request #145 by dcsobral (2012-01-26 20:21:39+00:00)
Title: Performance improvements for CommentFactory.

A few small improvements to the parsing steps of CommentFactory (both
main parsing and wiki format parsing), resulting in a 30% reduction
of time spent in def parse, which gives me 5% reduction in docs.lib.

Turn docBody into a StringBuilder, to improve concatenation speed. Make
WikiParser and CharReader work with String instead of Array[String], to
reduce copying of data. Get rid of the implicit conversion from String
to Array[String].

Also, adjust a couple of regex to avoid expensive backtracking. The
new regex has a different semantics, which is arguably more correct
than the former one. There's absolutely no change in the generated
docs for Scala anyway.