Performance - hashCode method of AbstractFallbackTransactionAttributeSource.DefaultCacheKey doesn't take targetClass into account [SPR-12536] #17141
Labels
in: data
Issues in data modules (jdbc, orm, oxm, tx)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Victor Bronstein opened SPR-12536 and commented
In commit 57eedf3 Juergen Hoeller has simplified the
hashCode
function of this class to use the method only and ignore thetargetClass
field. This causes a performance degradation because all methods inherited fromjava.lang.Object
map to the same hash (thus falling into the same bucket) but return false when compared (targetClass
differs). Therefore the price of getting a value from theattributeCache
rises considerably which given the enormous amount of calls togetTransactionAttribute
creates a performance degradation.Affects: 3.2.7, 4.1.3
Issue Links:
Backported to: 4.0.9, 3.2.13
The text was updated successfully, but these errors were encountered: