[Helma-user] Small patch for loop macro
Hannes Wallnoefer
hannes at helma.at
Fri May 11 10:09:37 CEST 2007
2007/5/11, Maksim Lin for technical support mailling lists
<maksim_lin at ngv.vic.gov.au>:
>
> I guess that means in macros, its more efficient to write their result
> string in with res.write or writeln instead of returning the string from
> the macro function?
If you just have one string to output, it doesn't make much of a
difference, since the Helma Skin class will just do the res.write()
for you. If, on the other hand, your macro output is composed of many
small pieces, it's better to directly use res.write(), since composing
a string with multiple + concatenations adds a lot of memory overhead
(each + operation results in the whole string being reallocated in
memory).
hannes
> Maks.
>
More information about the Helma-user
mailing list