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

Cache MediaTypeHeaderProvider.valueOf(String mType) results

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1.6, 3.2.0
    • Component/s: JAX-RS
    • Labels:
      None
    • Estimated Complexity:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: