[horde] Prefs_UI::generateUI($group);

Tom Hodder tom at scriptsupport.co.uk
Tue Dec 9 15:59:19 PST 2003


Quoting Chuck Hagenbuch <chuck at horde.org>:

> Quoting Tom Hodder <tom at scriptsupport.co.uk>:
>
> > I'm using the Prefs_UI::generateUI($group) function to generate t
> preferences
> > page, but I would like to store the output in a variable, and then insert
> > that variable into a template. Is there any way to do that rather than
> > somesort of output buffering hack using ob_start()?
>
> No. Why does everyone consider output buffering hackish? It's a very fast and
> efficient way of doing stuff like this (I benchmarked including a file vs.
> output buffering each inclusion of it for thousands of iterations, and the
> difference is basically nil).
>

The only time I've seen it make a big difference is when outputting tables with
many rows. With a for loop printing table rows, internet explorer flushes every
time it receives a full row from apache, whereas if the content is buffered as
block, then internet explorer gets it all in one chunk and it displays it in
one go. The only difference being that the user gets to see the page appearing
row by row, rather than waiting for the whole page to load in one go.

The thing about hackishness is that I noticed that there were some functions
like purl and url that offered options of print or return, and I was going to
use a horde function if it was possible. keep it in the family etc. and also
that I've had some mixed results with different versions of php using output
buffering.

Tom

> -chuck
>

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



More information about the horde mailing list