Details
-
Improvement
-
Status: Resolved
-
P4
-
Resolution: Fixed
-
2.8.0
Description
I'm currently profiling memory consumption of our Beam pipeline and have noticed that
org.apache.beam.sdk.values.PCollectionViews$SimplePCollectionView.hashCode()
makes noticeable heap allocations. The implementation is:
return Objects.hash(tag);
That itself translates to:
return Arrays.hashCode(values);
Which performs implicit array creation in order to call:
public static int Arrays.hashCode(Object a[]);
Instead of the helper call, doing simple:
tag.hashCode();
Seems more appropriate.