Return-Path: Delivered-To: apmail-james-server-dev-archive@www.apache.org Received: (qmail 84091 invoked from network); 8 Jul 2008 19:37:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Jul 2008 19:37:35 -0000 Received: (qmail 19873 invoked by uid 500); 8 Jul 2008 19:37:34 -0000 Delivered-To: apmail-james-server-dev-archive@james.apache.org Received: (qmail 19839 invoked by uid 500); 8 Jul 2008 19:37:34 -0000 Mailing-List: contact server-dev-help@james.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "James Developers List" Reply-To: "James Developers List" Delivered-To: mailing list server-dev@james.apache.org Received: (qmail 19818 invoked by uid 99); 8 Jul 2008 19:37:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jul 2008 12:37:34 -0700 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; Tue, 08 Jul 2008 19:36:40 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 426C4234C15E for ; Tue, 8 Jul 2008 12:36:32 -0700 (PDT) Message-ID: <1952326796.1215545792271.JavaMail.jira@brutus> Date: Tue, 8 Jul 2008 12:36:32 -0700 (PDT) From: "Oleg Kalnichevski (JIRA)" To: server-dev@james.apache.org Subject: [jira] Updated: (MIME4J-5) Mime4j takes really long to parse big messages In-Reply-To: <1290222.1171867085734.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/MIME4J-5?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oleg Kalnichevski updated MIME4J-5: ----------------------------------- Attachment: mime4j-3.patch Improved parsing of MIME headers: (1) eliminated one byte read in common cases; the parser will use a more efficient line parsing code whenever it can get a direct access to the underlying input buffer; the parser will fall back onto one byte read in case the direct access to the input buffer is impossible (the input stream needs to run through a decoding process) (2) reduced memory footprint; only one header will be buffered in memory at a time during the parsing process (3) synchronized StringBuffer is no longer used I had to tweak one test case. In all other cases the high level API remain absolutely the same. Please review. Oleg > Mime4j takes really long to parse big messages > ---------------------------------------------- > > Key: MIME4J-5 > URL: https://issues.apache.org/jira/browse/MIME4J-5 > Project: Mime4j > Issue Type: Bug > Affects Versions: 0.3 > Reporter: Norman Maurer > Assignee: Robert Burrell Donkin > Fix For: 0.4 > > Attachments: mime4j-2.patch, mime4j-3.patch, mime4j.patch > > > From ml: > Mime4j has general demonstrable performance problems: > http://buni.org/bugzilla/show_bug.cgi?id=137 > http://blog.buni.org/blog/mbarker/Meldware/2007/01/27/Look-out-Its-behind-you > I'd suggest a general code review for the "byte at a time + buffered input stream" anti-pattern > and general refactoring to do things in blocks where possible. > -Andy -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org For additional commands, e-mail: server-dev-help@james.apache.org