
Loading…
Would really love to see this.
+1
This is definitely a show stopper.
Any updates on this? This is kind of a critical issue - any way we can assist?
+1
This would be awesome.
+1
+1
HTTP streaming is the sort of thing that would require a substantial set of modifications to the core Haml engine. It's only moderately tricky to get it working even in basic cases, but when you factor in things like the whitespace-eating operators it gets much more difficult.
This isn't something I'm opposed to in theory, but it's also not something that's high on my priority list given the difficulty of implementing it.
+1
+1
+1 what would be required for this to work?
+1
@mhenrixon There would need to be some abstraction over the current output buffer that figured out when it was safe to flush the stream, taking into account all possible manipulations that may be done in the Haml code. This would also need to avoid negatively affecting the performance of non-streaming mode, as well as not being too much slower in streaming mode.
@gunn No; the whitespace nuke operators still need to work on user-generated strings, which aren't necessarily controlled by the :ugly flag.
+1
+1 , would love to have it
+1
+1
+1
+1
+1
+1
I wonder if there is a way for this to be possible:
This would allow us to still do streaming when needed, and have HAML for most partials.
Would this be difficult to implement? Would it work if HAML just pretend to be streaming compatible?
EDIT:
This is on the roadmap for Haml 4.0, which I hope to release by the end of the year.
+1
I've swapped haml for slim. This does have streaming support and also renders all my templates 6 times as fast (yes 6 times!). Automated converting can be done using the haml2slim gem, but that is a bit wonky atm. You should be able to use the slim gem to render the haml templates without converting, but then you'll have to write some rails magic to glue the two together.
+1
Goodbye haml, hello slim.
Just a quick FYI, we've decided to change the 3.2 release's number to 4.0 because it included breaking changes, so this feature will now be on the map for version 5.0. 4.0 will be out tomorrow.
+1
:+1
There appears to be an issue with using HTTP streaming with HAML projects in rails. It works perfectly if I use ERB instead.
It doesn't work with placing stream at the top of the controller, or with using render :stream => true in the action.