[jira] [Commented] (BEAM-5933) PCollectionViews$SimplePCollectionView.hashCode allocates memory

2019-01-24 Thread JIRA


[ 
https://issues.apache.org/jira/browse/BEAM-5933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16751579#comment-16751579
 ] 

Ismaël Mejía commented on BEAM-5933:


clone? close? I did not understand what is the reality? isn't allocating extra 
memory an issue?

> PCollectionViews$SimplePCollectionView.hashCode allocates memory
> 
>
> Key: BEAM-5933
> URL: https://issues.apache.org/jira/browse/BEAM-5933
> Project: Beam
>  Issue Type: Improvement
>  Components: sdk-java-core
>Affects Versions: 2.8.0
>Reporter: Vojtech Janota
>Assignee: Vojtech Janota
>Priority: Trivial
> Fix For: 2.9.0
>
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> 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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (BEAM-5933) PCollectionViews$SimplePCollectionView.hashCode allocates memory

2019-01-24 Thread Kenneth Knowles (JIRA)


[ 
https://issues.apache.org/jira/browse/BEAM-5933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16751443#comment-16751443
 ] 

Kenneth Knowles commented on BEAM-5933:
---

I was just going through the Release tab of Jira and I think it might be good 
to represent the reality there, so I will clone.

> PCollectionViews$SimplePCollectionView.hashCode allocates memory
> 
>
> Key: BEAM-5933
> URL: https://issues.apache.org/jira/browse/BEAM-5933
> Project: Beam
>  Issue Type: Improvement
>  Components: sdk-java-core
>Affects Versions: 2.8.0
>Reporter: Vojtech Janota
>Assignee: Vojtech Janota
>Priority: Trivial
> Fix For: 2.9.0
>
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> 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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)