[
https://issues.apache.org/jira/browse/FLINK-2653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14738894#comment-14738894
]
ASF GitHub Bot commented on FLINK-2653:
---------------------------------------
Github user StephanEwen commented on the pull request:
https://github.com/apache/flink/pull/1115#issuecomment-139276623
Thank, Greg, for this contribution, this is a good idea.
I think we need to extend it a bit. We observed that the object reuse mode
does not work with all types, especially certain user-defined types that are
serialized with Kryo. This is due to problems with empty instantiations and
object-to-object copies. For that reason, we made the non-reusing mode the
default, and the reusing mode optional.
All parts were one could not configure reuse/non-reuse were realized with
non-reuse, to be on the safe side.
To keep this safe, I would like to use by default the non-reusing mode and
the reusing mode when object reuse has been activated. For that, the reuse flag
would have to be passed to the `UnilateralSortMerger`, and interpreted in the
intermediate merge (line 1588ff).
If you could add this, it would be perfect and on the safe side.
> Enable object reuse in MergeIterator
> ------------------------------------
>
> Key: FLINK-2653
> URL: https://issues.apache.org/jira/browse/FLINK-2653
> Project: Flink
> Issue Type: Improvement
> Components: Distributed Runtime
> Affects Versions: master
> Reporter: Greg Hogan
>
> MergeIterator currently discards given reusable objects and simply returns a
> new object from the JVM heap. This inefficiency has a noticeable impact on
> garbage collection and runtime overhead (~5% overall performance by my
> measure).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)