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] [Closed] (FLINK-6768) Quadratic/Inefficient field lookup in PojoSerializer#ensureCompatibility

     [ https://issues.apache.org/jira/browse/FLINK-6768?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tzu-Li (Gordon) Tai closed FLINK-6768.
--------------------------------------
       Resolution: Fixed
         Assignee: Tzu-Li (Gordon) Tai  (was: boshu Zheng)
    Fix Version/s: 1.8.0

> 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: Tzu-Li (Gordon) Tai
>            Priority: Minor
>             Fix For: 1.8.0
>
>
> 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)