Haml re-indents the code of any text inserted with = to preserve 
indentation in the HTML output. This is a well-known bottleneck, which 
is independent of caching (although it becomes more painful when you 
insert large blocks of pre-rendered text). We're planning on adding an 
:ugly option which will allow you to signal to Haml that you're willing 
to forego nicely-formatted output for the sake of performance, but no 
such thing exists right now.

A better solution for your issue would probably be to disable the 
reformatting in production mode, rather than when you see a magic comment.

- Nathan

benalavi wrote:
> A couple things I forgot to note:
>
> 1) I don't know the Haml (or Erb) internals very well, so there may be
> a way better/simpler place to do something similar. Just wanted to
> bring it up and see if there were existing solutions or if this might
> be potentially useful.
>
> 2) This isn't necessarily a problem with Haml obviously, it could
> potentially affect any rendering engine, so it may be better solved w/
> in Rails itself. I think Haml being a bit slower is what made it so
> noticeable though.
>
> >
>
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to