Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » No Cache Option
No Cache Option [message #389456] Wed, 10 June 2009 16:47 Go to next message
Steve Willcox is currently offline Steve WillcoxFriend
Messages: 4
Registered: July 2009
Junior Member
I have a situation where we are ONLY inserting objects into the database
and not ever reading them from the application that is creating them. We
will be generating millions of these records per month.

In the short term since no one is yet reading them, it seems to me the
least impact on memory of the application creating them would be to use
NoIdentityMap option for those classes vs WeakIdentityMap. However,
several places in EclipseLink docs it says that NoIdentityMap is not a
recommended option since there is no guarantee of object identity.

So for the case described above, is NoIdentityMap going to save on memory
usage over WeakIdentityMap?
Re: No Cache Option [message #389461 is a reply to message #389456] Thu, 11 June 2009 16:35 Go to previous messageGo to next message
Steve Willcox is currently offline Steve WillcoxFriend
Messages: 4
Registered: July 2009
Junior Member
I did some tests with both caching options and the memory usage results
were about the same. In some cases the NoIdentityMap option was slightly
better and in other cases the WeakIdentityMap caching option's memory
usage was slightly better.

So, my conclusion is to stay with the WeakIndentityMap caching option.
Re: No Cache Option [message #389465 is a reply to message #389461] Mon, 15 June 2009 13:49 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

If you are only inserting you can disable the shared cache using the
persistence.xml option,

"eclipselink.cache.shared.default"="false"

You can also set this per class. This is the correct way to disable the
shared cache, and should give a performance improvement for insert only
apps. NoIdentityMap is not generally recommended.

---
James
http://www.nabble.com/EclipseLink---Users-f26658.html


James : Wiki : Book : Blog : Twitter
Previous Topic:Is there a way to automatically expire entity from cache when using EM's find()?
Next Topic:question on ClassNotFoundException: org.eclipse.persistence.sdo.SDOResolvable
Goto Forum:
  


Current Time: Wed Apr 24 19:16:51 GMT 2024

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

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

Back to the top