From mime4j-dev-return-712-apmail-james-mime4j-dev-archive=james.apache.org@james.apache.org Thu Dec 24 17:40:03 2009 Return-Path: Delivered-To: apmail-james-mime4j-dev-archive@minotaur.apache.org Received: (qmail 72289 invoked from network); 24 Dec 2009 17:40:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Dec 2009 17:40:03 -0000 Received: (qmail 37792 invoked by uid 500); 24 Dec 2009 17:40:03 -0000 Delivered-To: apmail-james-mime4j-dev-archive@james.apache.org Received: (qmail 37756 invoked by uid 500); 24 Dec 2009 17:40:03 -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 37746 invoked by uid 99); 24 Dec 2009 17:40:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Dec 2009 17:40:03 +0000 X-ASF-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [92.42.190.144] (HELO ok2cons2.nine.ch) (92.42.190.144) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Dec 2009 17:39:55 +0000 Received: from [192.168.1.106] (77-58-149-6.dclient.hispeed.ch [77.58.149.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ok2cons2.nine.ch (Postfix) with ESMTPSA id 14A9B4BA376 for ; Thu, 24 Dec 2009 18:39:33 +0100 (CET) Message-ID: <4B33A74F.7030701@apache.org> Date: Thu, 24 Dec 2009 18:39:27 +0100 From: Oleg Kalnichevski User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: mime4j-dev@james.apache.org Subject: Re: QuotedPrintable codec refactoring References: <4B2948D7.7090000@apache.org> <4B2A8687.6050504@apache.org> In-Reply-To: <4B2A8687.6050504@apache.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Oleg Kalnichevski wrote: > Oleg Kalnichevski wrote: >> Folks >> >> I am currently working on refactoring QuotedPrintable codecs to >> address MIME4J-103 and MIME4J-143. I also would like to look into >> possibility of eliminating intermediate content buffering in >> Base64InputStream and removal of ByteQueue and UnboundedFifoByteBuffer >> classes >> >> If I hear no objections, I'll be committing my changes directly to the >> trunk. Please complain loudly if that is not ok. If you prefer >> review-then-commit approach I could commit my changes to a private >> branch first. >> >> Oleg >> > > Just committed the first round of changes. I am already seeing ~250% > performance improvement. More to come. > > --- before the refactoring --- > 41262 ms > 104857600 bytes > 2.4235373951820076 mb/sec > > > --- after the refactoring --- > 15600 ms > 104857600 bytes > 6.410256410256411 mb/sec > > Oleg > I have completed the refactoring. I am seeing 600%-700% performance improvement over the previous implementation when parsing binary data streams. I believe improvement in performance for real-world, mostly ASCII messages should be pretty close to 10 fold. --- before the refactoring --- 41262 ms 104857600 bytes 2.4235373951820076 mb/sec --- after the refactoring --- 6405 ms 104857600 bytes 15.6128024980484 mb/sec On the downside the code has become significantly more cryptic and difficult to understand. So, peer code review / more testing would be great. Oleg