[
https://issues.apache.org/jira/browse/BEAM-5933?focusedWorklogId=161580&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-161580
]
ASF GitHub Bot logged work on BEAM-5933:
----------------------------------------
Author: ASF GitHub Bot
Created on: 01/Nov/18 14:23
Start Date: 01/Nov/18 14:23
Worklog Time Spent: 10m
Work Description: janotav opened a new pull request #6909: BEAM-5933:
avoid memory allocation in hashCode call
URL: https://github.com/apache/beam/pull/6909
Avoid unwanted memory allocation currently done during invocation of
org.apache.beam.sdk.values.PCollectionViews$SimplePCollectionView.hashCode()
------------------------
Follow this checklist to help us incorporate your contribution quickly and
easily:
- [ ] Format the pull request title like `[BEAM-XXX] Fixes bug in
ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA
issue, if applicable. This will automatically link the pull request to the
issue.
- [ ] If this contribution is large, please file an Apache [Individual
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
It will help us expedite review of your Pull Request if you tag someone
(e.g. `@username`) to look at it.
Post-Commit Tests Status (on master branch)
------------------------------------------------------------------------------------------------
Lang | SDK | Apex | Dataflow | Flink | Gearpump | Samza | Spark
--- | --- | --- | --- | --- | --- | --- | ---
Go | [](https://builds.apache.org/job/beam_PostCommit_Go_GradleBuild/lastCompletedBuild/)
| --- | --- | --- | --- | --- | ---
Java | [](https://builds.apache.org/job/beam_PostCommit_Java_GradleBuild/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex_Gradle/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow_Gradle/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink_Gradle/lastCompletedBuild/)
[](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump_Gradle/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza_Gradle/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark_Gradle/lastCompletedBuild/)
Python | [](https://builds.apache.org/job/beam_PostCommit_Python_Verify/lastCompletedBuild/)
| --- | [](https://builds.apache.org/job/beam_PostCommit_Py_VR_Dataflow/lastCompletedBuild/)
</br> [](https://builds.apache.org/job/beam_PostCommit_Py_ValCont/lastCompletedBuild/)
| [](https://builds.apache.org/job/beam_PostCommit_Python_VR_Flink/lastCompletedBuild/)
| --- | --- | ---
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 161580)
Time Spent: 10m
Remaining Estimate: 0h
> 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: Kenneth Knowles
> Priority: Trivial
> Time Spent: 10m
> 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)