openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christiaan <>
Subject Performance drop in AbstractHashedMap.clear()
Date Thu, 08 Nov 2007 09:01:22 GMT

I am noticing a big performance drop when executing the same method twice
within two separate transactions but with the same entitymanager involving a
large amount of objects. The method looks looks like this:

public void deleteObjects() {
   Set allObjectsToDelete = new HashSet();
   collectObjectsToDelete(objectIDs, allObjectsToDelete);

The allObjectsToDelete contains about 20000 objects. When executing this
method for the second time, there is a performance hit of a factor 3 to 4.
When profiling this, in the second run a new hotspot pops up in This takes
413200 ms. In the first run this only takes 213 ms! (There is only 10%
increase in the number of invocations) I've included some screenshots of the
profiling data. Actually, after the first delete I notice that many methods
(like iterating a single pc collections or retrieving other fields) have
dropped in performance, I guess this is related?

kind regards,
View this message in context:
Sent from the OpenJPA Developers mailing list archive at

View raw message