From cb37a5c7cb0132f01e20c885fc276d14d161c891 Mon Sep 17 00:00:00 2001 From: Tyler Gregg Date: Thu, 16 Jan 2025 15:45:50 -0800 Subject: [PATCH] Tunes the initial size of the EExpressionArgReader's expressions ArrayList. --- .../com/amazon/ion/impl/macro/EExpressionArgsReader.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/amazon/ion/impl/macro/EExpressionArgsReader.java b/src/main/java/com/amazon/ion/impl/macro/EExpressionArgsReader.java index 15bb6da65..a3bc1296f 100644 --- a/src/main/java/com/amazon/ion/impl/macro/EExpressionArgsReader.java +++ b/src/main/java/com/amazon/ion/impl/macro/EExpressionArgsReader.java @@ -25,8 +25,9 @@ public abstract class EExpressionArgsReader { private final ReaderAdapter reader; - // Reusable sink for expressions. - protected final List expressions = new ArrayList<>(16); + // Reusable sink for expressions. The starting size of 64 is chosen so that growth is minimized or avoided for most + // e-expression invocations. + protected final List expressions = new ArrayList<>(64); /** * Constructor.