Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » JPA 1.2 Overhead
JPA 1.2 Overhead [message #654369] Tue, 15 February 2011 13:26 Go to next message
Manuel Breu is currently offline Manuel BreuFriend
Messages: 2
Registered: February 2011
Junior Member
Hi there!
I am doing a huge data import using jpa 1.2 and eclipselink and i have to estimate the required heap space.
is there any documentation or method of calculation of the overhead that is generated by jpa in comparison to pure jse classes?
Re: JPA 1.2 Overhead [message #654597 is a reply to message #654369] Wed, 16 February 2011 13:03 Go to previous messageGo to next message
Michal Piotrowski is currently offline Michal PiotrowskiFriend
Messages: 6
Registered: February 2011
Junior Member
I would recommend you to write simple test (for example inserting 100000 rows) and monitor heap usage using jvisualvm (included in every recent JDK).
Re: JPA 1.2 Overhead [message #654918 is a reply to message #654369] Thu, 17 February 2011 15:46 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

Also ensure you disable caching for the import, enable batch writing if your database supports it, and ensure weaving is used.

Also don't do the whole insert in one transaction or one EntityManager, break it up into batches of say 1000.

Also consider the properties,

"eclipselink.persistence-context.persist-on-commit"="false "
"eclipselink.persistence-context.close-on-commit"="true"

If you are really adventurous you could also process multiple batches at the same time on multiple threads.


James : Wiki : Book : Blog : Twitter
Previous Topic:EclipseLink & Cell Names with White Space
Next Topic:Incorrect PostgreSQL's BLOB support in EclipseLink JPA
Goto Forum:
  


Current Time: Thu Mar 28 17:18:30 GMT 2024

Powered by FUDForum. Page generated in 0.03707 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top