Skip to main content



      Home
Home » Eclipse Projects » EclipseLink » No Cache Option
No Cache Option [message #389456] Wed, 10 June 2009 12:47 Go to next message
Eclipse UserFriend
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 12:35 Go to previous messageGo to next message
Eclipse UserFriend
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 09:49 Go to previous message
Eclipse UserFriend
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
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: Mon Jul 07 16:23:23 EDT 2025

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

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

Back to the top