[haml] Haml + Ragel

2011-01-25 Thread Bruno Azisaka Maciel
Hi, is there anyone working on a parser for Haml using Ragel? I'm working on a project and Haml is our biggest problem right now. Haml takes around 80% of throughput. A friend of mine told me about a migration done on Redcloth which changed the old parser to a new one using Ragel. Is there a

Re: [haml] Haml + Ragel

2011-01-25 Thread Chris Eppstein
Do you have the :ugly option set to true? chris On Tue, Jan 25, 2011 at 6:02 AM, Bruno Azisaka Maciel br...@azisaka.com.brwrote: Hi, is there anyone working on a parser for Haml using Ragel? I'm working on a project and Haml is our biggest problem right now. Haml takes around 80% of

Re: [haml] Haml + Ragel

2011-01-25 Thread Nathan Weizenbaum
If parsing Haml is taking a long time, you're doing something wrong. A Haml template should only be parsed once; then the compiled template should be cached and used for all future generations of the result. The Haml::Engine#def_method method can be used to do this easily:

Re: [haml] Haml + Ragel

2011-01-25 Thread Bruno Azisaka Maciel
Chris, the :ugly option is set to true. On Tue, Jan 25, 2011 at 5:47 PM, Chris Eppstein ch...@eppsteins.net wrote: Do you have the :ugly option set to true? chris On Tue, Jan 25, 2011 at 6:02 AM, Bruno Azisaka Maciel br...@azisaka.com.br wrote: Hi, is there anyone working on a parser

Re: [haml] Haml + Ragel

2011-01-25 Thread Nathan Weizenbaum
The :ugly option actually doesn't affect parsing speed, just generation speed. On Tue, Jan 25, 2011 at 12:17 PM, Bruno Azisaka Maciel br...@azisaka.com.br wrote: Chris, the :ugly option is set to true. On Tue, Jan 25, 2011 at 5:47 PM, Chris Eppstein ch...@eppsteins.netwrote: Do you have

Re: [haml] Haml + Ragel

2011-01-25 Thread Bruno Azisaka Maciel
Yep. But it doesn't seem my templates are being cached. Anyway I think I could be building more objects into my collections than I should be. Maybe that's the problem. Gonna try some tweaks over here. Thanks for pointing the parsing tips. On Tue, Jan 25, 2011 at 6:28 PM, Nathan Weizenbaum