My Rails 3.0 app on ruby 1.8.7 contains Haml 3.1.3. Most of the views are haml templates, it takes about 0.5-5ms to render them on my machine in production mode.
Having said that, a few partials take much longer. 300ms to 900ms for 30-60 lines of haml. It must be something in the way how I use it, but how could I debug what's wrong? The benchmarks are consistent and reproducible.
I'm not sure about possible sources of the error:
- deep partial nesting? (3-5 levels)
- deep haml nesting? (4-8 levels)
- use of block helpers?
- lots of translations?
- using haml with formtastic 2.0?
- using form builders for nested forms?
Any help is appreciated.