[Minor] Small memory consumption improvement
This commit is contained in:
parent
9801e8e543
commit
d2f19dca5d
|
@ -139,7 +139,7 @@ public class InMemoryDao<T extends StrolchRootElement> implements StrolchDao<T>
|
||||||
return null;
|
return null;
|
||||||
ArrayDeque<T> list = byType.get(id);
|
ArrayDeque<T> list = byType.get(id);
|
||||||
if (list == null)
|
if (list == null)
|
||||||
return new ArrayList<>();
|
return new ArrayList<>(0);
|
||||||
return new ArrayList<>(list);
|
return new ArrayList<>(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ public class InMemoryDao<T extends StrolchRootElement> implements StrolchDao<T>
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list == null) {
|
if (list == null) {
|
||||||
list = new ArrayDeque<>();
|
list = new ArrayDeque<>(2);
|
||||||
byType.put(element.getId(), list);
|
byType.put(element.getId(), list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue