You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/03 23:03:13 UTC

[GitHub] [beam] kennknowles opened a new issue, #19243: PCollectionViews$SimplePCollectionView.hashCode once again allocates memory (fix reverted, then fixed again)

kennknowles opened a new issue, #19243:
URL: https://github.com/apache/beam/issues/19243

   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.
   
   Imported from Jira [BEAM-6503](https://issues.apache.org/jira/browse/BEAM-6503). Original Jira may contain additional context.
   Reported by: janotav.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@beam.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org