Skip to content

Commit 67e36f1

Browse files
Speedup deserialization in InternalAggregations (#105596)
We can use the faster list reader here because the category is a constant.
1 parent eeff618 commit 67e36f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/main/java/org/elasticsearch/search/aggregations/InternalAggregations.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public static InternalAggregations from(List<InternalAggregation> aggregations)
165165
}
166166

167167
public static InternalAggregations readFrom(StreamInput in) throws IOException {
168-
return from(in.readCollectionAsList(stream -> stream.readNamedWriteable(InternalAggregation.class)));
168+
return from(in.readNamedWriteableCollectionAsList(InternalAggregation.class));
169169
}
170170

171171
@Override

0 commit comments

Comments
 (0)