NetworkList create a potentially superfluous copy on each write operation
yueh opened this issue ยท 0 comments
The NetworkList
is currently creating a copy of the internal list with every write operation like add
, remove
or their corresponding bulk methods.
As this list is actually just a Collection
and never exposes the internal collection at all, creating an exact copy internally each time should not provide any benefit. As a LinkedList
is backing the collection, it will still keep the the insertion order intact, regardless of creating a copy beforehand or not.
Thus the copy should actually be superfluous, but should certainly be validated later.