From mime4j-dev-return-1056-apmail-james-mime4j-dev-archive=james.apache.org@james.apache.org Thu Mar 04 21:22:04 2010 Return-Path: Delivered-To: apmail-james-mime4j-dev-archive@minotaur.apache.org Received: (qmail 321 invoked from network); 4 Mar 2010 21:22:01 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 4 Mar 2010 21:22:01 -0000 Received: (qmail 90515 invoked by uid 500); 4 Mar 2010 21:21:49 -0000 Delivered-To: apmail-james-mime4j-dev-archive@james.apache.org Received: (qmail 90481 invoked by uid 500); 4 Mar 2010 21:21:49 -0000 Mailing-List: contact mime4j-dev-help@james.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mime4j-dev@james.apache.org Delivered-To: mailing list mime4j-dev@james.apache.org Received: (qmail 90473 invoked by uid 99); 4 Mar 2010 21:21:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Mar 2010 21:21:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Mar 2010 21:21:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 38D65234C4C8 for ; Thu, 4 Mar 2010 21:21:27 +0000 (UTC) Message-ID: <1059784119.80561267737687232.JavaMail.jira@brutus.apache.org> Date: Thu, 4 Mar 2010 21:21:27 +0000 (UTC) From: "Stefano Bagnara (JIRA)" To: mime4j-dev@james.apache.org Subject: [jira] Commented: (MIME4J-174) Refactor org.mime4j.util.CharsetUtil to lazily determine supported encodings/decodings In-Reply-To: <1735334455.77911267731567560.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/MIME4J-174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12841528#action_12841528 ] Stefano Bagnara commented on MIME4J-174: ---------------------------------------- Forgot to say that patches are welcome :-) > Refactor org.mime4j.util.CharsetUtil to lazily determine supported encodings/decodings > -------------------------------------------------------------------------------------- > > Key: MIME4J-174 > URL: https://issues.apache.org/jira/browse/MIME4J-174 > Project: JAMES Mime4j > Issue Type: Improvement > Reporter: Richard von Keyserling > > On initialization CharsetUtil determines all supported endcodings and decodings by attempting to encode and decode a dummy string with every entry in JAVA_CHARSETS. This loads a lot of classes into the JVM which in turn uses up a lot of permGen. > Moving the decoding and encoding tests into isDecodingSupported() and isEncodingSupported() and adding positive results to the decodingSupported and encodingSupported treeSets from those methods would allow the class to only load encoders and decoders the application needs. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.