You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Tzu-Li (Gordon) Tai (JIRA)" <ji...@apache.org> on 2019/02/22 08:02:00 UTC
[jira] [Commented] (FLINK-6768) Quadratic/Inefficient field lookup
in PojoSerializer#ensureCompatibility
[ https://issues.apache.org/jira/browse/FLINK-6768?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16774886#comment-16774886 ]
Tzu-Li (Gordon) Tai commented on FLINK-6768:
--------------------------------------------
Fixed for 1.8.0 via cf65720aef60fe771833a96de4d0e2d6a9d11725
> Quadratic/Inefficient field lookup in PojoSerializer#ensureCompatibility
> ------------------------------------------------------------------------
>
> Key: FLINK-6768
> URL: https://issues.apache.org/jira/browse/FLINK-6768
> Project: Flink
> Issue Type: Improvement
> Components: State Backends, Checkpointing, Type Serialization System
> Affects Versions: 1.3.0, 1.4.0
> Reporter: Till Rohrmann
> Assignee: boshu Zheng
> Priority: Minor
>
> In the {{PojoSerializer#ensureCompatibility}} method we call for each field in the {{PojoSerializerConfigSnapshot}} the {{findField}} method which executes a linear scan of the array of fields of the {{PojoSerializer}}. This effectively has a quadratic runtime and could be done more efficiently. For example, we could construct a {{HashMap}} containing the fields as keys and the index as values. That way we would have a have a better lookup performance.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)