[ https://issues.apache.org/jira/browse/FLINK-37680?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Zhanghao Chen updated FLINK-37680: ---------------------------------- Attachment: (was: image-2025-04-15-16-31-21-369.png) > Add subclass cache for PojoSerializer > ------------------------------------- > > Key: FLINK-37680 > URL: https://issues.apache.org/jira/browse/FLINK-37680 > Project: Flink > Issue Type: Sub-task > Components: API / Type Serialization System > Reporter: Zhanghao Chen > Priority: Major > Attachments: image-2025-04-15-16-31-55-289.png, > image-2025-04-15-16-33-11-325.png > > > When the value to deserialize is an untagged subclass of the declared POJO > type, Flink loads its acutal class every time using {{{}Class.forName{}}}, > which is inefficient. We can cache the subclasses to speed up. > We tested on a production job, and the result is promising: > * Flame graph before the optim (Class.forName highlighted in green): > !image-2025-04-15-16-31-55-289.png|width=457,height=150! > * Flame graph after the optim (Subclass cache access highlighted in green): > !image-2025-04-15-16-33-11-325.png|width=460,height=156! -- This message was sent by Atlassian Jira (v8.20.10#820010)