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 1C0A118A91 for ; Fri, 8 Jan 2016 22:10:43 +0000 (UTC) Received: (qmail 49618 invoked by uid 500); 8 Jan 2016 22:10:41 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 49587 invoked by uid 500); 8 Jan 2016 22:10:41 -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 49474 invoked by uid 99); 8 Jan 2016 22:10:41 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Jan 2016 22:10:41 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 934122C1F5C for ; Fri, 8 Jan 2016 22:10:40 +0000 (UTC) Date: Fri, 8 Jan 2016 22:10:40 +0000 (UTC) From: "Alessio Soldano (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CXF-6739) Reduce memory pressure in org.apache.cxf.attachment.AttachmentDeserializer MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-6739?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:all-tabpanel ] Alessio Soldano updated CXF-6739: --------------------------------- Description: Back in 2013, the api (now core) went through a major refa= ctoring to remove direct dependency to javax.mail: https://github.com/apach= e/cxf/commit/6ae8f4afe219581938c0020612212faa3e770064 Custom code for attac= hment deserialization was added, but unfortunately that seems to be writing= a lot of char[] to the memory, because of a lot of String instances being = created for parsing the attachment inputstream into the headers TreeMap. Th= e process could be optimized to avoid useless string / char[] copies. It al= so seems that the special handling of lines starting with spaces there is o= ver complicated and covering a condition that can never be true. (was: Bac= k in 2013, the api (now core) went through a major refactoring to remove di= rect dependency to javax.mail: https://github.com/apache/cxf/commit/6ae8f4a= fe219581938c0020612212faa3e770064 Custom code for attachment deserializatio= n was added, but unfortunately that seems to be writing a lot of char[] to = the memory, because of a lot of String instances being created for parsing = the attachment inputstream into the headers TreeMap. The process could be o= ptimized to avoid useless string / byte[] copies. It also seems that the sp= ecial handling of lines starting with spaces there is over complicated and = covering a condition that can never be true.) > Reduce memory pressure in org.apache.cxf.attachment.AttachmentDeserialize= r > -------------------------------------------------------------------------= - > > Key: CXF-6739 > URL: https://issues.apache.org/jira/browse/CXF-6739 > Project: CXF > Issue Type: Improvement > Components: Core > Affects Versions: 3.0.0-milestone1 > Reporter: Alessio Soldano > Assignee: Alessio Soldano > Fix For: 3.1.5, 3.2.0 > > > Back in 2013, the api (now core) went through a major refactoring to remo= ve direct dependency to javax.mail: https://github.com/apache/cxf/commit/6a= e8f4afe219581938c0020612212faa3e770064 Custom code for attachment deseriali= zation was added, but unfortunately that seems to be writing a lot of char[= ] to the memory, because of a lot of String instances being created for par= sing the attachment inputstream into the headers TreeMap. The process could= be optimized to avoid useless string / char[] copies. It also seems that t= he special handling of lines starting with spaces there is over complicated= and covering a condition that can never be true. -- This message was sent by Atlassian JIRA (v6.3.4#6332)