[
https://issues.apache.org/jira/browse/FLINK-37722?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Weihua Hu resolved FLINK-37722.
-------------------------------
Fix Version/s: 2.3.0
Resolution: Resolved
master: ae4583209f5f9b89ee98bc069b7f2fe8c882de2a
> Eliminate redundant field initialization when deserializing POJOs
> -----------------------------------------------------------------
>
> Key: FLINK-37722
> URL: https://issues.apache.org/jira/browse/FLINK-37722
> Project: Flink
> Issue Type: Sub-task
> Components: API / Type Serialization System
> Reporter: Zhanghao Chen
> Assignee: Zhanghao Chen
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.3.0
>
> Attachments: image-2025-04-27-14-40-25-539.png
>
>
> Currently, PojoSerializer will first create a new POJO instance and
> initialize all the fields (in the createInstance() method), then deserialize
> and set fields. The field initialization with in the createInstance() method
> is redundant, as all fields will be set later during deserialization anyway.
> We should eliminate it for better performance.
> The TupleSerializer has already applied similar techique, see the usage of
> TupleSerializer#instantiateRaw.
> Benchmark with the Flink PojoSerializationBenchmark shows a 5% improvement.
> !image-2025-04-27-14-40-25-539.png!
--
This message was sent by Atlassian Jira
(v8.20.10#820010)