jdorn/sql-formatter — pull request #19 by dlsniper (2012-12-23 20:14:13+00:00)
Title: Token parser refactoring

Hey there :)

I've did some extensive profiling on the test case I've provided earlier this week and I've managed to refactor the biggest time consuming part of the token parser.

Unfortunately it also introduces a small BC break, you can compare the files here: http://db.tt/Q2y2XXCh in terms of highlighting. It will recognize the non-escaped keywords as keywords not text. I think this could also be considered as bug fix rather that BC break.

Besides this, I haven't noticed any side effects, the test now takes 1-2/10th of the previous run as for memory it's a increase of about 80k or so.

Thanks and happy holidays!