Crazy Days and Almost Haml 1.7

Posted June 25, 2007

Wow, has it been a crazy few days. My younger brother’s Bar Mitzvah was on Saturday. The whole family came from California, New England, and even Germany. Between catching up with folks I haven’t seen in years and talking to my grandfather1, I’ve barely had a moment to think since Thursday. So if you haven’t heard much from me in the past few days, that’s why2.

All the spare time I have had has been devoted either to tetris, or to fixing up bugs and adding features to Haml in preparation for version 1.7, which we’ll be releasing next Saturday.

1.7 is going to be very, very cool. Various features have been added such as snazzy helpers for creating HTML in Ruby that work (almost) as well as Haml, a way to nicely do stuff like “a:hover” in Sass, and finally adding a unary minus operator for SassScript.

The coolest thing, though, is the performance. According to my benchmarks, Haml 1.7 is 57% faster than Haml 1.5. That’s right, it’s more than half again as fast. That means that whereas it used to take three times as long for Haml to parse a file than for RHTML to parse a roughly equivalent file, Haml now only takes about 1.75 times as long as RHTML.

Credit, of course, goes where it’s due. All the optimization that allowed the above to happen was concieved of and implemented by Tom Bagby3.

Tom also began experimenting with cutting out all formatting from Haml’s output. While of course we still hold by our commitment to beautiful output, we’ll eventually be offering that as an option. What performance benefit does it get? Well, Tom actually managed to get Haml running faster than ERB. That’s pretty sweet.

Keep your eyes open on the 31st. 1.7’s going to be very cool. And very, very fast.

1 Or rather, listening to. He tends to do most of the talking; the rest of the family takes turns listening to him.

2 I know in particular Jon Leighton has been waiting for several days for my input on a new structure for the Scribble GUI code.

3 I couldn’t find a personal site for Tom, so that’s a link to his company’s blog.

Jon Leighton said June 25, 2007:

Hey no worries about the slow response time – I’ve been pretty stacked myself so I haven’t had any scribble time either :)

Make your comments snazzy with Textile!