New setting: auto_flush

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

New setting: auto_flush

Daniel Dekany
I have just committed this... any comments? From the version history:

New setting: "auto_flush", Configurable.setAutoFlush(boolean). Sets
whether the output Writer is automatically flushed at the end of
Template.process(Object, Writer) (and its overloads). The default is
true, which corresponds to the earlier behavior. Using false is needed
for example when a Web page is composed from several boxes (like
portlets, GUI panels, etc.) that aren't inserted with #include (or
with similar directives) into a master FreeMarker template, rather
they are all processed with a separate Template.process(...) call. In
a such scenario the automatic flushes would commit the HTTP response
after each box, hence interfering with full-page buffering, and also
possibly decreasing performance with too frequent and too early
response buffer flushes.

--
Best regards,
 Daniel Dekany


------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
FreeMarker-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-devel
Reply | Threaded
Open this post in threaded view
|

Re: New setting: auto_flush

Attila Szegedi-4
Looks okay to me.

On Nov 30, 2010, at 5:38 AM, Daniel Dekany wrote:

> I have just committed this... any comments? From the version history:
>
> New setting: "auto_flush", Configurable.setAutoFlush(boolean). Sets
> whether the output Writer is automatically flushed at the end of
> Template.process(Object, Writer) (and its overloads). The default is
> true, which corresponds to the earlier behavior. Using false is needed
> for example when a Web page is composed from several boxes (like
> portlets, GUI panels, etc.) that aren't inserted with #include (or
> with similar directives) into a master FreeMarker template, rather
> they are all processed with a separate Template.process(...) call. In
> a such scenario the automatic flushes would commit the HTTP response
> after each box, hence interfering with full-page buffering, and also
> possibly decreasing performance with too frequent and too early
> response buffer flushes.
>
> --
> Best regards,
> Daniel Dekany

------------------------------------------------------------------------------
This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
_______________________________________________
FreeMarker-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-devel