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.ObjectOutputStream;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
@ -130,16 +131,17 @@ public class ActionQueue {
|
||||||
orphanRemovals = new ExecutableList<OrphanRemovalAction>();
|
orphanRemovals = new ExecutableList<OrphanRemovalAction>();
|
||||||
|
|
||||||
// Important: these lists are in execution order
|
// Important: these lists are in execution order
|
||||||
List<ExecutableList<?>> tmp = new ArrayList<ExecutableList<?>>( 7 );
|
List<ExecutableList<?>> tmp = Arrays.asList(
|
||||||
tmp.add( orphanRemovals );
|
orphanRemovals,
|
||||||
tmp.add( insertions );
|
insertions,
|
||||||
tmp.add( updates );
|
updates,
|
||||||
// do before actions are handled in the other collection queues
|
// do before actions are handled in the other collection queues
|
||||||
tmp.add( collectionQueuedOps );
|
collectionQueuedOps,
|
||||||
tmp.add( collectionRemovals );
|
collectionRemovals,
|
||||||
tmp.add( collectionUpdates );
|
collectionUpdates,
|
||||||
tmp.add( collectionCreations );
|
collectionCreations,
|
||||||
tmp.add( deletions );
|
deletions
|
||||||
|
);
|
||||||
|
|
||||||
executableLists = Collections.unmodifiableList( tmp );
|
executableLists = Collections.unmodifiableList( tmp );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue