Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 11F3419A0A for ; Wed, 9 Mar 2016 11:11:41 +0000 (UTC) Received: (qmail 2211 invoked by uid 500); 9 Mar 2016 11:11:40 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 2175 invoked by uid 500); 9 Mar 2016 11:11:40 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 2114 invoked by uid 99); 9 Mar 2016 11:11:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Mar 2016 11:11:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C6A352C1F55 for ; Wed, 9 Mar 2016 11:11:40 +0000 (UTC) Date: Wed, 9 Mar 2016 11:11:40 +0000 (UTC) From: "Alessio Soldano (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CXF-6826) Cache MediaTypeHeaderProvider.valueOf(String mType) results MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-6826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15186957#comment-15186957 ] Alessio Soldano commented on CXF-6826: -------------------------------------- Pull request: https://github.com/apache/cxf/pull/121 > Cache MediaTypeHeaderProvider.valueOf(String mType) results > ----------------------------------------------------------- > > Key: CXF-6826 > URL: https://issues.apache.org/jira/browse/CXF-6826 > Project: CXF > Issue Type: Improvement > Components: JAX-RS > Reporter: Alessio Soldano > > 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. -- This message was sent by Atlassian JIRA (v6.3.4#6332)