[hibernate-dev] Comment patch - cascading performance

Yves Galante yyvess at gmail.com
Thu Oct 22 16:11:50 EDT 2009


Could someone look at HHH-3860 and comment on the patch attached in
JIRA. It a update from an old patch "HHH-2272  Serious performance
problems when saving large amount".

This patch optimize cascading operation by the caching the relation
parent-child on a temporary map.
When a child find its parent, he lookup on his map, at the end of the
cascading  operation, the map is empty.
Actually his parent it fined by parsing all entity of the session.

eventSource.getPersistenceContext().addChildParent(child, parent);
action.cascade(eventSource, child, entityName, anything,

Cascade 5510 objects took 30906 ms on my test before this patch.
With the patch the test case took 4905 ms.



More information about the hibernate-dev mailing list