From 1729067cbc23971f31cf33e63550af59a1e67de5 Mon Sep 17 00:00:00 2001 From: Andrea Boriero Date: Wed, 14 Oct 2015 14:03:22 +0100 Subject: [PATCH] HHH-10190 - org.hibernate.engine.spi.ActionQueue#executeActions() optimization --- .../main/java/org/hibernate/engine/spi/ActionQueue.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/engine/spi/ActionQueue.java b/hibernate-core/src/main/java/org/hibernate/engine/spi/ActionQueue.java index 19d8842d96..27fc5faca0 100644 --- a/hibernate-core/src/main/java/org/hibernate/engine/spi/ActionQueue.java +++ b/hibernate-core/src/main/java/org/hibernate/engine/spi/ActionQueue.java @@ -316,7 +316,9 @@ public class ActionQueue { * @throws HibernateException error executing queued insertion actions. */ public void executeInserts() throws HibernateException { - executeActions( insertions ); + if ( !insertions.isEmpty() ) { + executeActions( insertions ); + } } /** @@ -330,7 +332,9 @@ public class ActionQueue { } for ( ExecutableList l : executableLists ) { - executeActions( l ); + if ( !l.isEmpty() ) { + executeActions( l ); + } } }