DefaultRefFilter#getTaggableRefs: remove presizing

Since we're filtering out the refs/changes/ prefix, the presized array
is likely too large, leading to extra memory/garbage overhead.

Change-Id: If28d2d4125923fce6b67de728a353ecd6e0be7de
This commit is contained in:
Han-Wen Nienhuys
2021-02-04 17:49:21 +01:00
parent 89db90ca66
commit 44ae6cd430

View File

@@ -326,7 +326,7 @@ class DefaultRefFilter {
&& !r.getName().startsWith(RefNames.REFS_TAGS)
&& !r.isSymbolic()
&& !r.getName().equals(RefNames.REFS_CONFIG))
.collect(toCollection(() -> new ArrayList<>(allRefs.size())));
.collect(Collectors.toList());
} catch (IOException e) {
throw new PermissionBackendException(e);
}