You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Mark Priatel <mp...@espial.com> on 2001/05/28 04:29:11 UTC

Resource / Template size

Is there any way to get the size of a template/resource?  Taking a quick
look at the API it would seem not, but it would nice to know so that we
could , among other things, initialize StringWriters to an appropriate
size..

-mark


Re: Resource / Template size

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Mark Priatel wrote:
> 
> Is there any way to get the size of a template/resource?  Taking a quick
> look at the API it would seem not, but it would nice to know so that we
> could , among other things, initialize StringWriters to an appropriate
> size..
> 
> -mark

Not at the moment. 

On this subject, in general I can't see how you can accurately predict
the output size from the template size, as many things can come into
play :

- loops (#foreach() )
- #include() / #parse()
- velocimacros...

geir

-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
"still climbing up to the shoulders..."