[ 
https://issues.apache.org/jira/browse/FLINK-21375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17288184#comment-17288184
 ] 

Xintong Song commented on FLINK-21375:
--------------------------------------

[~ykt836], thanks for the pointer.

This might indeed be a problem that, with FLINK-21417 merged, multiple 
implementations of {{MemorySegment}} can be loaded, which disables JIT 
optimizations.

I think we should measure the performance differences before & after the 
changes. We may need to revert the changes if there's indeed a significant 
regression.

Moreover, {{RawFormatSerializationSchema}} has been using {{HeapMemorySegment}} 
before our changes, which may also cause multiple implementations of 
{{MemorySegment}} being loaded. If we're reverting the changes, we should also 
migrate those use cases to {{HybridMemorySegment}}, and maybe remove 
{{HeapMemorySegment}} to avoid unexpected usages in future.

> Refactor HybridMemorySegment
> ----------------------------
>
>                 Key: FLINK-21375
>                 URL: https://issues.apache.org/jira/browse/FLINK-21375
>             Project: Flink
>          Issue Type: Task
>          Components: Runtime / Coordination
>            Reporter: Xintong Song
>            Assignee: Xintong Song
>            Priority: Major
>             Fix For: 1.13.0
>
>
> Per the discussion in [this PR|https://github.com/apache/flink/pull/14904], 
> we plan to refactor {{HybridMemorySegment}} as follows.
> * Separate into memory type specific implementations: heap / direct / native 
> (unsafe)
> * Remove {{wrap()}}, replacing with {{processAsByteBuffer()}}
> * Remove native memory cleaner logic



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to