My Rails 3.0 application on ruby 1.8.7 contains Haml 3.1.3. Most of the views are haml templates, it takes about 0.5-5 ms to get them on my machine in working mode.
Having said that, some partial parts take much longer. From 300 ms to 900 ms for 30-60 haml lines. It should be something in the way I use it, but how can I debug what is wrong? Benchmarks are consistent and reproducible.
I am not sure about the possible sources of the error:
- deep partial investment? (3-5 levels)
- deep haml enclosure? (4-8 levels)
- using block helpers?
- many translations?
- Using haml with formtastic 2.0?
- using form builders for nested forms?
Any help is appreciated.
source share