Chris,
What do you mean by batching? Do you mean persisting 200, committing, persisting another 200, committing, etc? If so, I don't have the option of doing this because my objects reference one another so the cascading persist would blow up my batch size.

Thanks,
Aron

On 6/14/2011 10:54 AM, C N Davies wrote:
I had a load of issues with committing large quantities of entities (OpenJPA
2.0), in the end I batched them into batches of 200 and the overall
performance was significantly better.  This is not a scientific analysis of
the issue I know, but might be of use to you :)

Chris


-----Original Message-----
From: Aron Lurie [mailto:[email protected]]
Sent: Wednesday, 15 June 2011 12:50 AM
To: [email protected]
Subject: Re: Speeding up commit

2.1.0

On 6/14/2011 10:47 AM, Rick Curtis wrote:
What version of OpenJPA are you running?

On Tue, Jun 14, 2011 at 9:45 AM, Aron
Lurie<[email protected]>wrote:
Hello,
I have a situation where I am trying to persist ~2500 objects all at
once.
After the objects are persisted, the program ends, so there is no
need for any functionality after the objects have been persisted. I
am just trying to dump these objects to the DB as fast as possible.

Using Eclipse's TPTP profiler, I have timed the
EntityManager.commit() operation to take 586 seconds. Of that,
cumulatively almost 455 seconds are spent inside of ~2500 calls to
StateManagerImpl.proxyFields(bool, bool).
   From the point that I start commit(), those 2nd class objects are
not mutated by my program, and I do not need to use any of these
objects after
commit() finishes. From what I have read, it would seem that I have
no need for my objects to be proxied, and from my tests, it seems
that removing proxies would speed things up significantly. Am I
missing something? Or is there a way to turn off proxies? And if not,
how can I speed up the proxying operation?

Thanks,
Aron



Reply via email to