One thing I have noticed it that the newbie programmers that are most likely
to not implement equals and hashCode correctly, don't use a custom primary
key. Instead they use an Integer, Long, or String. 

-dain

> -----Original Message-----
> From: marc fleury [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 13, 2001 5:11 PM
> To: Jboss-Development@Lists. Sourceforge. Net
> Subject: [JBoss-dev] CacheKey copy semantics and speed
> 
> 
> I am reading the CMR 2.0 code and I see that it makes 
> intensive use of the
> CacheKey creation (which I guess is normal).
> 
> In cachekey, the change introduced by Bill, i.e. to enforce 
> copy semantics
> is a very slow operation.  It involves a full serialization.  This has
> negative effects.
> 
> 1- it slows the finders
> 2- it slows the cmr stuff
> 3- thank god it doesn't affect the "normal operation" speed 
> which is the
> optimized lookup
> 
> One of the points of the cachekey is to be fast, uber fast by 
> precompiling
> the key hashcode to be used and the equals.  I understand the 
> problem that
> bill was trying to solve with the serialization but it is just too
> expensive.
> 
> I want to turn this behavior off by default, Bill if you feel 
> strongly we
> could put an optional field so that these keys are copied but 
> by default it
> is a killer.
> 
> It must be a property of the cache and I intend to expose more of them
> through the JMX interface.  In any case it would be a 
> jboss.xml thingy.
> 
> Just being a good boy and following Scott's demand for 
> "tracking" changes, I
> fully agree.
> 
> marcf
> 
> 
> 
> xxxxxxxxxxxxxxxx
> Marc Fleury
> President
> JBoss Group, LLC
> xxxxxxxxxxxxxxxx
> 
> 
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
> 

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to