HHH-9479 Avoiding array list growth in ActionQueue constructor
This commit is contained in:
parent
c7f58ab57e
commit
9a881907f5
|
@ -28,6 +28,7 @@ import java.io.ObjectInputStream;
|
|||
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 class ActionQueue {
|
|||
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 );
|
||||
List<ExecutableList<?>> tmp = Arrays.asList(
|
||||
orphanRemovals,
|
||||
insertions,
|
||||
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 );
|
||||
collectionQueuedOps,
|
||||
collectionRemovals,
|
||||
collectionUpdates,
|
||||
collectionCreations,
|
||||
deletions
|
||||
);
|
||||
|
||||
executableLists = Collections.unmodifiableList( tmp );
|
||||
|
||||
|
|
Loading…
Reference in New Issue