From: <Web...@St...> - 2004-03-28 03:41:41
|
On Mon, 15 Mar 2004, Keats wrote: | I think Lane's solution is ultimately best -- don't try to write to the | underlying stream from within a template, just return a String and let WM | handle it. (Note: I have no good suggestions here, just a point.) This is bad for performance, I kinda feel. Returning a megabyte String to be included in a stream, when you really could have outputted the stuff you were making directly to the stream is really really not good. There are probably a StringBuffer creation, several String creations, and whatnot, in addition to the rush of memory being used for this TOTALLY useless intermediate object. Allthough I hate the FastWriter, it -must- be possible for things inside the template to directly output (read: "render") to the "actual target". That said, I come to think about the Macro interface (class?). Why does it have two methods there? I have never understood which of the methods are invoked when: one fo them (I am on vacation now, so I can't find the details) have never been invoked when I have made Macro implementation. This is also very very badly documented, not explaining nothing. Endre. |