[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: few newbie quesitons..


On 5/11/07, James. L <suppressed> wrote:
even if i am using an iterator object and call it.next
in TT, doesn't TT actually keep the rendered template
page into one variable and dump it to the browser? in
that case, the memory consumed is still equal to the
entire size of the data and iterator doesn't help
here. am i right?

You would end up with one copy of the data in memory (in the rendered
template) instead of two if you use an iterator.  If it's a really
large amount of data, you could avoid creating a giant template output
variable by breaking it up into multiple chunks and sending them to
the client as you go.  Template Toolkit may not be the best tool for
this part of your application.

- Perrin


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.