You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Lukáš Kolísko <lk...@gmail.com> on 2005/08/22 21:53:18 UTC

Application slowing down

Hello,
I am not sure if this question is right in this list, but maybe
somebody could help me. I developing Tapestry application. I use
hibernate for persistence layer with long term session pattern and I
store HibernateSession into the user session.

Application has a medium complicated object tree so I use lazy
initialization to prevent loading all objects at once.

The problem is that application after about 10 request slows down.
Sometimes java heap space error occurs so I think that there is a
problem with memory. I do not use any recursive algorithms so this
could not be the possible reason of slowing down because of memory.

There are many components nested inside other components and the trees
of components can be about 10 steps from root to leaves. But I think
that this should not be the problem.

I use JettyPlus/ 5.1.4, Hibernate 3, Tapestry 3.0.3

I have experimented with jetty settings and heap problems dissapeared
but the slow down still occurs.

If somebody could give me advice what I am doing wrong or have seen
this problem I would be very grateful.

Thanks in advance.

Lukas Kolisko

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


Re: Application slowing down

Posted by Pablo Ruggia <pr...@gmail.com>.
Sorry, where says "you can keep" is "you can't keep"

On 8/22/05, Pablo Ruggia <pr...@gmail.com> wrote:
> 
> Jesse's advice won't work with hibernate long session pattern.
> 
> With long session pattern, you have to use one session per application 
> transaction, you can keep one session forever.
> You have to close your session and open a new one in every place you can 
> do it.
> 
> 
> On 8/22/05, Paul Cantrell <ca...@pobox.com> wrote:
> > 
> > This is completely correct.
> > 
> > If you're going to use the Hibernate long-term session pattern, you
> > have to explicitly *remove* objects from the session when you're done
> > with them. (That's one of the reasons I don't much like the long-term 
> > session pattern.) Take this to a Hibernate mailing list for more info.
> > 
> > P
> > 
> > 
> > On Aug 22, 2005, at 3:19 PM, Jesse Kuhnert wrote:
> > 
> > > Don't store the hibernate session into the users session. I wouldn't 
> > > even store the hibernate objects in the user session...Store the
> > > unique id's of the objects in their session and call
> > > Session.load(<class name>, <unique id>) on pageBeginRender instead.. 
> > >
> > > The hibernate session object holds all of the data referenced during
> > > your session, slowly accumulating more and more data the more you use
> > > it.
> > > On 8/22/05, Lukáš Kolísko < lkolisko@gmail.com> wrote:
> > >
> > >> Hello,
> > >> I am not sure if this question is right in this list, but maybe
> > >> somebody could help me. I developing Tapestry application. I use
> > >> hibernate for persistence layer with long term session pattern and I 
> > >> store HibernateSession into the user session.
> > >>
> > >> Application has a medium complicated object tree so I use lazy
> > >> initialization to prevent loading all objects at once.
> > >> 
> > >> The problem is that application after about 10 request slows down.
> > >> Sometimes java heap space error occurs so I think that there is a
> > >> problem with memory. I do not use any recursive algorithms so this 
> > >> could not be the possible reason of slowing down because of memory.
> > >>
> > >> There are many components nested inside other components and the
> > >> trees
> > >> of components can be about 10 steps from root to leaves. But I think 
> > >> that this should not be the problem.
> > >>
> > >> I use JettyPlus/ 5.1.4, Hibernate 3, Tapestry 3.0.3
> > >>
> > >> I have experimented with jetty settings and heap problems dissapeared
> > >> but the slow down still occurs.
> > >>
> > >> If somebody could give me advice what I am doing wrong or have seen
> > >> this problem I would be very grateful.
> > >>
> > >> Thanks in advance. 
> > >>
> > >> Lukas Kolisko
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > >> For additional commands, e-mail: tapestry-user-
> > >> help@jakarta.apache.org
> > >>
> > >>
> > > 
> > 
> > _________________________________________________________________
> > 
> > "Les grandes personnes ne comprennent jamais rien toutes seules,
> > et c'est fatigant, pour les enfants, de toujours et toujours
> > leur donner des explications." -- Antoine de Saint-Exupéry 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > 
> > 
>

Re: Application slowing down

Posted by Pablo Ruggia <pr...@gmail.com>.
Jesse's advice won't work with hibernate long session pattern.

With long session pattern, you have to use one session per application 
transaction, you can keep one session forever.
You have to close your session and open a new one in every place you can do 
it.


On 8/22/05, Paul Cantrell <ca...@pobox.com> wrote:
> 
> This is completely correct.
> 
> If you're going to use the Hibernate long-term session pattern, you
> have to explicitly *remove* objects from the session when you're done
> with them. (That's one of the reasons I don't much like the long-term
> session pattern.) Take this to a Hibernate mailing list for more info.
> 
> P
> 
> 
> On Aug 22, 2005, at 3:19 PM, Jesse Kuhnert wrote:
> 
> > Don't store the hibernate session into the users session. I wouldn't
> > even store the hibernate objects in the user session...Store the
> > unique id's of the objects in their session and call
> > Session.load(<class name>, <unique id>) on pageBeginRender instead..
> >
> > The hibernate session object holds all of the data referenced during
> > your session, slowly accumulating more and more data the more you use
> > it.
> > On 8/22/05, Lukáš Kolísko <lk...@gmail.com> wrote:
> >
> >> Hello,
> >> I am not sure if this question is right in this list, but maybe
> >> somebody could help me. I developing Tapestry application. I use
> >> hibernate for persistence layer with long term session pattern and I
> >> store HibernateSession into the user session.
> >>
> >> Application has a medium complicated object tree so I use lazy
> >> initialization to prevent loading all objects at once.
> >>
> >> The problem is that application after about 10 request slows down.
> >> Sometimes java heap space error occurs so I think that there is a
> >> problem with memory. I do not use any recursive algorithms so this
> >> could not be the possible reason of slowing down because of memory.
> >>
> >> There are many components nested inside other components and the
> >> trees
> >> of components can be about 10 steps from root to leaves. But I think
> >> that this should not be the problem.
> >>
> >> I use JettyPlus/ 5.1.4, Hibernate 3, Tapestry 3.0.3
> >>
> >> I have experimented with jetty settings and heap problems dissapeared
> >> but the slow down still occurs.
> >>
> >> If somebody could give me advice what I am doing wrong or have seen
> >> this problem I would be very grateful.
> >>
> >> Thanks in advance.
> >>
> >> Lukas Kolisko
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: tapestry-user-
> >> help@jakarta.apache.org
> >>
> >>
> >
> 
> _________________________________________________________________
> 
> "Les grandes personnes ne comprennent jamais rien toutes seules,
> et c'est fatigant, pour les enfants, de toujours et toujours
> leur donner des explications." -- Antoine de Saint-Exupéry
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
>

Re: Application slowing down

Posted by Paul Cantrell <ca...@pobox.com>.
This is completely correct.

If you're going to use the Hibernate long-term session pattern, you  
have to explicitly *remove* objects from the session when you're done  
with them. (That's one of the reasons I don't much like the long-term  
session pattern.) Take this to a Hibernate mailing list for more info.

P


On Aug 22, 2005, at 3:19 PM, Jesse Kuhnert wrote:

> Don't store the hibernate session into the users session. I wouldn't
> even store the hibernate objects in the user session...Store the
> unique id's of the objects in their session and call
> Session.load(<class name>, <unique id>) on pageBeginRender instead..
>
> The hibernate session object holds all of the data referenced during
> your session, slowly accumulating more and more data the more you use
> it.
> On 8/22/05, Lukáš Kolísko <lk...@gmail.com> wrote:
>
>> Hello,
>> I am not sure if this question is right in this list, but maybe
>> somebody could help me. I developing Tapestry application. I use
>> hibernate for persistence layer with long term session pattern and I
>> store HibernateSession into the user session.
>>
>> Application has a medium complicated object tree so I use lazy
>> initialization to prevent loading all objects at once.
>>
>> The problem is that application after about 10 request slows down.
>> Sometimes java heap space error occurs so I think that there is a
>> problem with memory. I do not use any recursive algorithms so this
>> could not be the possible reason of slowing down because of memory.
>>
>> There are many components nested inside other components and the  
>> trees
>> of components can be about 10 steps from root to leaves. But I think
>> that this should not be the problem.
>>
>> I use JettyPlus/ 5.1.4, Hibernate 3, Tapestry 3.0.3
>>
>> I have experimented with jetty settings and heap problems dissapeared
>> but the slow down still occurs.
>>
>> If somebody could give me advice what I am doing wrong or have seen
>> this problem I would be very grateful.
>>
>> Thanks in advance.
>>
>> Lukas Kolisko
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user- 
>> help@jakarta.apache.org
>>
>>
>

_________________________________________________________________

"Les grandes personnes ne comprennent jamais rien toutes seules,
  et c'est fatigant, pour les enfants, de toujours et toujours
  leur donner des explications."     -- Antoine de Saint-Exupéry


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


Re: Application slowing down

Posted by Jesse Kuhnert <jk...@gmail.com>.
Don't store the hibernate session into the users session. I wouldn't
even store the hibernate objects in the user session...Store the
unique id's of the objects in their session and call
Session.load(<class name>, <unique id>) on pageBeginRender instead..

The hibernate session object holds all of the data referenced during
your session, slowly accumulating more and more data the more you use
it.
On 8/22/05, Lukáš Kolísko <lk...@gmail.com> wrote:
> Hello,
> I am not sure if this question is right in this list, but maybe
> somebody could help me. I developing Tapestry application. I use
> hibernate for persistence layer with long term session pattern and I
> store HibernateSession into the user session.
> 
> Application has a medium complicated object tree so I use lazy
> initialization to prevent loading all objects at once.
> 
> The problem is that application after about 10 request slows down.
> Sometimes java heap space error occurs so I think that there is a
> problem with memory. I do not use any recursive algorithms so this
> could not be the possible reason of slowing down because of memory.
> 
> There are many components nested inside other components and the trees
> of components can be about 10 steps from root to leaves. But I think
> that this should not be the problem.
> 
> I use JettyPlus/ 5.1.4, Hibernate 3, Tapestry 3.0.3
> 
> I have experimented with jetty settings and heap problems dissapeared
> but the slow down still occurs.
> 
> If somebody could give me advice what I am doing wrong or have seen
> this problem I would be very grateful.
> 
> Thanks in advance.
> 
> Lukas Kolisko
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
>