Dirty checking Performance issue

3 Messages Forum Options Options
Permalink
graffer
Dirty checking Performance issue
Reply Threaded More
Print post
Permalink
Hi guys,

Are there any limitations concerning the persistence cache in OpenJPA? I'm having an application that loads several thousand entities and then adds some using em.persist(newEntity);

The problem is that persists takes extremly long (up to serveral seconds per entity on a server machine)!
The profiler shows me that the persist method stays very long in the dirty checking:

90,8% - 1.266 s - 31 inv. org.apache.openjpa.kernel.ManagedCache.dirtyCheck

Flushing or evicting entities from the session is not possible in this application.
Can anyone help with this issue?

bye, Georg
--
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
Patrick Linskey-2
Re: Dirty checking Performance issue
Reply Threaded More
Print post
Permalink
Hi,

Can you describe your environment in a bit more detail? Is the OpenJPA  
code being called from a main() app? A Java EE app?

-Patrick

On Jul 3, 2008, at 6:33 AM, Georg Raffer wrote:

> Hi guys,
>
> Are there any limitations concerning the persistence cache in  
> OpenJPA? I'm having an application that loads several thousand  
> entities and then adds some using em.persist(newEntity);
>
> The problem is that persists takes extremly long (up to serveral  
> seconds per entity on a server machine)!
> The profiler shows me that the persist method stays very long in the  
> dirty checking:
>
> 90,8% - 1.266 s - 31 inv.  
> org.apache.openjpa.kernel.ManagedCache.dirtyCheck
>
> Flushing or evicting entities from the session is not possible in  
> this application.
> Can anyone help with this issue?
>
> bye, Georg
> --
> Psssst! Schon vom neuen GMX MultiMessenger gehört?
> Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger
--
Patrick Linskey
202 669 5907



smime.p7s (3K) Download Attachment
graffer
Re: Dirty checking Performance issue
Reply Threaded More
Print post
Permalink
Hello Patrick

Thank you for your fast reply. Sorry that I described the problem in such a short way.
In detail it is a JBOSS 4.2.1 application where we try to replace Hibernate with OpenJPA. Java 5 is used. Therefore we use the runtime enhancement. As I now found in the mailing list this is the problem. Changing to build time enhancement solves the problem:

http://mail-archives.apache.org/mod_mbox/openjpa-users/200807.mbox/browser

It now works as expected.

bye, Georg
--
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser