You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Rodnei Couto <ro...@tecgraf.puc-rio.br> on 2006/08/28 14:24:59 UTC

OutOfMemory in tapestry 4.0.3

I´m using tapestry 4.0.2 and i am having problems with OutOfMemory
exceptions generating some VERY big reports (more than 10000 elements).

I searched in the maillist but didn´t find any solution:
http://marc2.theaimsgroup.com/?l=tapestry-user&m=112864214530411&w=2

The report page is quite simple. Just a "for" with a custom component
inside to generate de HTML output inside a table. Using a Memory
Profiler i found out that all the generation of the report went fine and
when tapestry started rendering  it reached 300 MB of memory with no
output to the browser. After every thing was rendered the memory stared
to go down and tapestry starded to output to the browser.

Is there any way of outputing to the browser on fly?


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Correction: OutOfMemory in tapestry 4.0.2

Posted by Rodnei Couto <ro...@tecgraf.puc-rio.br>.
Rodnei Couto escreveu:
> I´m using tapestry 4.0.2 and i am having problems with OutOfMemory
> exceptions generating some VERY big reports (more than 10000 elements).
>
> I searched in the maillist but didn´t find any solution:
> http://marc2.theaimsgroup.com/?l=tapestry-user&m=112864214530411&w=2
>
> The report page is quite simple. Just a "for" with a custom component
> inside to generate de HTML output inside a table. Using a Memory
> Profiler i found out that all the generation of the report went fine and
> when tapestry started rendering  it reached 300 MB of memory with no
> output to the browser. After every thing was rendered the memory stared
> to go down and tapestry starded to output to the browser.
>
> Is there any way of outputing to the browser on fly?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: OutOfMemory in tapestry 4.0.3

Posted by Rodnei Couto <ro...@tecgraf.puc-rio.br>.
I removed the @Body from the page and now the output seems to be working 
fine. The report is being outputed onfly as each component is rendered.
I guess the problem was really the buffer in the tag Body.

Thanks,
Rodnei Couto


Henri Dupre escreveu:
> On 8/28/06, andyhot <an...@di.uoa.gr> wrote:
>>
>> Henri Dupre wrote:
>> > On 8/28/06, Rodnei Couto <ro...@tecgraf.puc-rio.br> wrote:
>> >>
>> >> I did this and it didn't work.... it seems that Tapestry still 
>> does not
>> >> send the html to the browser...
>> >>
>> >> Is it expected that Tapestry will render everything before sending 
>> the
>> >> output to the browser?
>> >
>> >
>> > This is quite strange... what do you have inside your loop? I suspect
>> > that
>> > these components could be optimized.
>> > Tapestry 4 doesn't buffer and it sends the output straight to the
>> > browser.
>> if you're using @Body, it does buffer... it needs to gather all
>> contributed javascript
>> and render them in the correct places.
>
>
> Actually even in the case of buffering, I'd be surprised that it is the
> output that is really causing the out of memory.
> I don't know what is the -Xmx parameter used but a fair guess is that 
> there
> would be at least 100 mb of memory free?
> Even with 10000 elements, 100 mb would be really alot.
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: OutOfMemory in tapestry 4.0.3

Posted by Henri Dupre <he...@gmail.com>.
On 8/28/06, andyhot <an...@di.uoa.gr> wrote:
>
> Henri Dupre wrote:
> > On 8/28/06, Rodnei Couto <ro...@tecgraf.puc-rio.br> wrote:
> >>
> >> I did this and it didn't work.... it seems that Tapestry still does not
> >> send the html to the browser...
> >>
> >> Is it expected that Tapestry will render everything before sending the
> >> output to the browser?
> >
> >
> > This is quite strange... what do you have inside your loop? I suspect
> > that
> > these components could be optimized.
> > Tapestry 4 doesn't buffer and it sends the output straight to the
> > browser.
> if you're using @Body, it does buffer... it needs to gather all
> contributed javascript
> and render them in the correct places.


Actually even in the case of buffering, I'd be surprised that it is the
output that is really causing the out of memory.
I don't know what is the -Xmx parameter used but a fair guess is that there
would be at least 100 mb of memory free?
Even with 10000 elements, 100 mb would be really alot.


-- 
Henri Dupre
Actualis Center

Re: OutOfMemory in tapestry 4.0.3

Posted by andyhot <an...@di.uoa.gr>.
Henri Dupre wrote:
> On 8/28/06, Rodnei Couto <ro...@tecgraf.puc-rio.br> wrote:
>>
>> I did this and it didn't work.... it seems that Tapestry still does not
>> send the html to the browser...
>>
>> Is it expected that Tapestry will render everything before sending the
>> output to the browser?
>
>
> This is quite strange... what do you have inside your loop? I suspect
> that
> these components could be optimized.
> Tapestry 4 doesn't buffer and it sends the output straight to the
> browser.
if you're using @Body, it does buffer... it needs to gather all
contributed javascript
and render them in the correct places.
>
> Can somebody help me?
>
>
> Can you show more of your code and page?
>


-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / J2EE Consulting 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: OutOfMemory in tapestry 4.0.3

Posted by Henri Dupre <he...@gmail.com>.
On 8/28/06, Rodnei Couto <ro...@tecgraf.puc-rio.br> wrote:
>
> I did this and it didn't work.... it seems that Tapestry still does not
> send the html to the browser...
>
> Is it expected that Tapestry will render everything before sending the
> output to the browser?


This is quite strange... what do you have inside your loop? I suspect that
these components could be optimized.
Tapestry 4 doesn't buffer and it sends the output straight to the browser.

Can somebody help me?


Can you show more of your code and page?

-- 
Henri Dupre
Actualis Center

Re: OutOfMemory in tapestry 4.0.3

Posted by Rodnei Couto <ro...@tecgraf.puc-rio.br>.
I did this and it didn't work.... it seems that Tapestry still does not 
send the html to the browser... 

Is it expected that Tapestry will render everything before sending the 
output to the browser?

Can somebody help me?

Rodnei Couto

Martin Strand escreveu:
> Maybe Tapestry needs to render the whole loop internally first in order to know how to persist the loop in hidden fields.
> Perhaps setting volatile=true on the loop helps?
>
> On Mon, 28 Aug 2006 14:24:59 +0200, Rodnei Couto <ro...@tecgraf.puc-rio.br> wrote:
>
>   
>> I´m using tapestry 4.0.2 and i am having problems with OutOfMemory
>> exceptions generating some VERY big reports (more than 10000 elements).
>>
>> I searched in the maillist but didn´t find any solution:
>> http://marc2.theaimsgroup.com/?l=tapestry-user&m=112864214530411&w=2
>>
>> The report page is quite simple. Just a "for" with a custom component
>> inside to generate de HTML output inside a table. Using a Memory
>> Profiler i found out that all the generation of the report went fine and
>> when tapestry started rendering  it reached 300 MB of memory with no
>> output to the browser. After every thing was rendered the memory stared
>> to go down and tapestry starded to output to the browser.
>>
>> Is there any way of outputing to the browser on fly?
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: OutOfMemory in tapestry 4.0.3

Posted by Martin Strand <ma...@entcap.se>.
Maybe Tapestry needs to render the whole loop internally first in order to know how to persist the loop in hidden fields.
Perhaps setting volatile=true on the loop helps?

On Mon, 28 Aug 2006 14:24:59 +0200, Rodnei Couto <ro...@tecgraf.puc-rio.br> wrote:

> I´m using tapestry 4.0.2 and i am having problems with OutOfMemory
> exceptions generating some VERY big reports (more than 10000 elements).
>
> I searched in the maillist but didn´t find any solution:
> http://marc2.theaimsgroup.com/?l=tapestry-user&m=112864214530411&w=2
>
> The report page is quite simple. Just a "for" with a custom component
> inside to generate de HTML output inside a table. Using a Memory
> Profiler i found out that all the generation of the report went fine and
> when tapestry started rendering  it reached 300 MB of memory with no
> output to the browser. After every thing was rendered the memory stared
> to go down and tapestry starded to output to the browser.
>
> Is there any way of outputing to the browser on fly?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org