You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Andriy Redko (Jira)" <ji...@apache.org> on 2021/08/03 00:09:00 UTC

[jira] [Commented] (CXF-8571) Enum serialization slowed down by the search for XmlEnumValue annotation.

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

Andriy Redko commented on CXF-8571:
-----------------------------------

[~media-interactive] thank you for the detailed analysis, may I ask you please if you had a chance to explore alternative solution (fe cache some annotation lookups, ...) instead of removing the introspection completely? By all means, optimizing for better performance make total sense, but if it has to be turned off for 90% of the users, it may not be worth it.

> Enum serialization slowed down by the search for XmlEnumValue annotation.
> -------------------------------------------------------------------------
>
>                 Key: CXF-8571
>                 URL: https://issues.apache.org/jira/browse/CXF-8571
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 3.3.5
>            Reporter: Mint Media Interactive
>            Priority: Major
>              Labels: Enum, XmlEnumValue, perfomance, reflection, serialization
>         Attachments: EnumType.java.diff, EnumType.mod.java, callTree.png
>
>
> Using CXF for SOAP serialization we noticed a significant performance issue with intensive CPU load when the serialization of enum values is involved: it appeared to us that most time is spent in org.apache.cxf.aegis.type.java5.EnumType while the annotation belonging to the given enum is searched.
>  !callTree.png! 
> The sought annotation is XmlEnumValue, used to specify a custom string to serialize a member of the enumeration, in place of its simple name. Our code does not make use of that annotation: so we got a notable performance improvement (about 20%-30% in some calls) just by modifying the EnumType class in order to not look for it.
>  [^EnumType.mod.java]  [^EnumType.java.diff] 
> We think it might be useful to have an option or setting to disable searching for that annotation or to activate some other comparable optimization.



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