openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Curtis <curti...@gmail.com>
Subject Re: Speeding up commit
Date Tue, 14 Jun 2011 15:48:43 GMT
Unfortunately it's looking like a this is a code path which we don't have an
optimizations for.... Essentially you're using OpenJPA to put data into a DB
and then once your tran commits you're not going to use the Entities any
longer.? If you're looking for a workaround, you could noop
org.apache.openjpa.kernel.SingleFieldManager.proxy(...) and just return
true. Not ideal, but it might work for you in the short term.

On Tue, Jun 14, 2011 at 10:35 AM, C N Davies <cnd@cndavies.com> wrote:

> Hi Aron,
>
> Yes that is what I meant,  I persist and commit 200 at a time.  When my
> objects are highly complex I threw in em.clear() as I was getting stack
> issues as well.
>
> Chris
>
> -----Original Message-----
> From: Aron Lurie [mailto:aron@cambridgesemantics.com]
> Sent: Wednesday, 15 June 2011 1:06 AM
> To: users@openjpa.apache.org
> Subject: Re: Speeding up commit
>
> 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:aron@cambridgesemantics.com]
> > Sent: Wednesday, 15 June 2011 12:50 AM
> > To: users@openjpa.apache.org
> > 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<aron@cambridgesemantics.com>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
> >>>
> >>
>
>


-- 
*Rick Curtis*

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message