Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8571

Enum serialization slowed down by the search for XmlEnumValue annotation.

    XMLWordPrintableJSON

Details

    • Unknown

    Description

      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.

      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.

      Attachments

        1. EnumType.java.diff
          0.8 kB
          Mint Media Interactive
        2. EnumType.mod.java
          4 kB
          Mint Media Interactive
        3. callTree.png
          258 kB
          Mint Media Interactive

        Activity

          People

            Unassigned Unassigned
            media-interactive Mint Media Interactive
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: