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

Cache MediaTypeHeaderProvider.valueOf(String mType) results

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 3.1.6, 3.2.0
    • JAX-RS
    • None
    • Unknown

    Description

      MediaTypeHeaderProvider.valueOf(String mType) ends up being called a lot with the same parameter values, as those are basically the contents of the @Produce annotations on resources. Each request ends up into the same invocation, which is cpu and memory intensive.
      It might make sense to add a map in the MediaTypeHeaderProvider to store the result of the static valueOf method invocation.

      Attachments

        Issue Links

          Activity

            People

              asoldano Alessio Soldano
              asoldano Alessio Soldano
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: