Project: aptanastudio
Issue APSTUD-4452: Use initialCapacity when generating collections in CollectionsUtil
Current CollectionsUtil#newMap/newSet/newList create their collections using the default constructors. However, this could cause more memory to be used than is needed to contain the items that will be added to them. Additionally, if the collection has to be resized, that introduces a slightly performance decrease. To avoid both of these issues, we should use the constructors that allow us to define an initial capacity, especially since we already know how many items are going to be added to the collections.
Story points: 3