You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Mint Media Interactive (Jira)" <ji...@apache.org> on 2021/07/30 11:11:00 UTC

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

Mint Media Interactive created CXF-8571:
-------------------------------------------

             Summary: 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
         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)