mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-28 06:49:09 +00:00
HHH-9479 Avoiding array list growth in ActionQueue constructor
This commit is contained in:
parent
9ff134aee7
commit
b938fa2f93
@ -28,6 +28,7 @@
|
||||
import java.io.ObjectOutputStream;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
@ -130,16 +131,17 @@ public ActionQueue(SessionImplementor session) {
|
||||
orphanRemovals = new ExecutableList<OrphanRemovalAction>();
|
||||
|
||||
// Important: these lists are in execution order
|
||||
List<ExecutableList<?>> tmp = new ArrayList<ExecutableList<?>>( 7 );
|
||||
tmp.add( orphanRemovals );
|
||||
tmp.add( insertions );
|
||||
tmp.add( updates );
|
||||
// do before actions are handled in the other collection queues
|
||||
tmp.add( collectionQueuedOps );
|
||||
tmp.add( collectionRemovals );
|
||||
tmp.add( collectionUpdates );
|
||||
tmp.add( collectionCreations );
|
||||
tmp.add( deletions );
|
||||
List<ExecutableList<?>> tmp = Arrays.asList(
|
||||
orphanRemovals,
|
||||
insertions,
|
||||
updates,
|
||||
// do before actions are handled in the other collection queues
|
||||
collectionQueuedOps,
|
||||
collectionRemovals,
|
||||
collectionUpdates,
|
||||
collectionCreations,
|
||||
deletions
|
||||
);
|
||||
|
||||
executableLists = Collections.unmodifiableList( tmp );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user