« Freebase | Home | Nice new editing features »

Syntax Highlighting With Extra Awesome

By Dan | January 11, 2008

Since Christmas I have been rewriting the core of the syntax highlighting engine in C as Ruby just wasn’t fast enough. I was a bit apprehensive about this, but the Ruby-C interface is very nice to work with, and toss in Glib and it’s really not that painful. There’s something deeply satisfying about profiling, re-implementing a single method in C, and getting a 66% percent speedup immediately.

I’ve made a ton of fixes too and it feels much more solid. No more crashes and the speed is approaching usable. (It can do 500 lines in about 3 seconds 1 second - roughly.)

Anyway I leave you with a spot the difference competition :). Thanks to Ludvig Widman for the lovely theme.

Redcar:

redcar-2-trimmed.png

Textmate:

textmate.png

Topics: development |

2 Responses to “Syntax Highlighting With Extra Awesome”

  1. assente Says:
    May 31st, 2008 at 7:51 pm

    Why not gtksourceview?

  2. Dan Says:
    June 2nd, 2008 at 6:38 am

    Because gtksourceview doesn’t read Textmate language grammars. And the rest of Textmate’s bundles (commands, snippets etc.) depend upon the grammars for context.

    Gtksourceview 2.0 is a nice piece of work, but I wanted the cross-platform compatibility with the textmate.

Comments