Re: few newbie quesitons..

2007-05-29 Thread Perrin Harkins
On 5/29/07, Jay Buffington <[EMAIL PROTECTED]> wrote: On 5/6/07, Perrin Harkins <[EMAIL PROTECTED]> wrote: > On 5/6/07, James. L <[EMAIL PROTECTED]> wrote: > > my question is > > once the app produce the html, does the memory > > allocated by the parsed data get released to perl? > > that memory

Re: few newbie quesitons..

2007-05-29 Thread Jay Buffington
I'm a little behind here, but this thread caught my eye: On 5/6/07, Perrin Harkins <[EMAIL PROTECTED]> wrote: On 5/6/07, James. L <[EMAIL PROTECTED]> wrote: > my question is > once the app produce the html, does the memory > allocated by the parsed data get released to perl? > that memory will b

Re: few newbie quesitons..

2007-05-11 Thread James. L
--- Perrin Harkins <[EMAIL PROTECTED]> wrote: > On 5/11/07, James. L <[EMAIL PROTECTED]> 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 m

Re: few newbie quesitons..

2007-05-11 Thread Perrin Harkins
On 5/11/07, James. L <[EMAIL PROTECTED]> 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 itera

Re: few newbie quesitons..

2007-05-11 Thread Andy Armstrong
On 11 May 2007, at 15:31, James. L wrote: here is my understand and please verify. say i have sub parse { return $array_ref_contain_the_data } does that memory used by the $array_ref_contain_the_data can be reused by other mod_perl application too? or it is used only by the particular $array_re

Re: few newbie quesitons..

2007-05-11 Thread James. L
i still have few questions, would you please answer them for me? see below.. --- Perrin Harkins <[EMAIL PROTECTED]> wrote: > On 5/7/07, James. L <[EMAIL PROTECTED]> wrote: > > the files i need to parse are usually in size of > 2M - > > 10M. will the mod_perl server(2G Mem) use up the > > memory p

Re: few newbie quesitons..

2007-05-07 Thread Perrin Harkins
On 5/7/07, James. L <[EMAIL PROTECTED]> wrote: do you mean parsing the file during each iteration and get the next availabe result then return it to TT? Yes. Open the file and then read it line-by-line as the iterator requests it. Look at the docs for Template::Iterator. - Perrin

Re: few newbie quesitons..

2007-05-07 Thread James. L
--- Perrin Harkins <[EMAIL PROTECTED]> wrote: > > sub parse { > > my ($class,$file) = @_; > > my @data; > > open my $F, $file or die $!; > > while ( my $line = <$F> ) { > > my @fields = split /=/, $line; > > push @data, [EMAIL PROTECTED]; > > } > > close $F; > > return [EMAI

Re: few newbie quesitons..

2007-05-06 Thread Perrin Harkins
On 5/7/07, James. L <[EMAIL PROTECTED]> wrote: the files i need to parse are usually in size of 2M - 10M. will the mod_perl server(2G Mem) use up the memory pretty quick after few hundred requests on different files? You're misunderstanding a little bit. It's not that the memory used in parsin

Re: few newbie quesitons..

2007-05-06 Thread James. L
--- Perrin Harkins <[EMAIL PROTECTED]> wrote: > On 5/6/07, James. L <[EMAIL PROTECTED]> wrote: > > my question is > > once the app produce the html, does the memory > > allocated by the parsed data get released to perl? > > that memory will be reused by other mod_perl app? > > No, Perl doesn't w

Re: few newbie quesitons..

2007-05-06 Thread Perrin Harkins
On 5/6/07, James. L <[EMAIL PROTECTED]> wrote: my question is once the app produce the html, does the memory allocated by the parsed data get released to perl? that memory will be reused by other mod_perl app? No, Perl doesn't work that way. It will keep that memory allocated for that variable