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:
Any help is appreciated.
It turned out to be a number of things inside Formtastic 2.0:
Fixes have been added to Formtastic 2.1 and up, making it a lot faster. Kudos to Sascha Konietzke for providing patches.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With