Markus Wiederkehr ha scritto: > On Sun, Dec 14, 2008 at 11:49 PM, Robert Burrell Donkin > <[email protected]> wrote: >> On Sun, Dec 14, 2008 at 8:35 PM, Markus Wiederkehr >> <[email protected]> wrote: >>> Sorry about my last comment on MIME4J-66. I did not realize that it is >>> about Base64Encoder, not Base64OutputStream.. >>> >>> But is Base64Encoder really necessary? I mean >>> CodecUtil.encodeBase64(InputStream, OutputStream) could also be >>> implemented as: >>> Base64OutputStream b64Out = new Base64OutputStream(out); >>> copy(in, b64Out); >>> b64Out.close(); >>> >>> Why maintain two versions? >> copy uses more memory and is slower > > I have written another performance test for this. The current code has > a throughput of about 6 mb/sec on my machine. The change to > Base64OutputStream I proposed boosts it up to 110 mb/sec..
WOW! what do you mean by "current code" ? The Base64Encoder or the previous OutputStream? AFAIK CodecUtil.encodeBase64 is "published" but *not* used by mime4j, right? > Plus, the current code does not even pass a simple roundtrip test > because it writes padding characters in the middle of the stream. I guess this is because of the known bug in base64Encoder (https://issues.apache.org/jira/browse/MIME4J-67) > I have attached my performance tests to MIME4J-71 if you want to take > a look at them. > > I suggest we remove Base64Encoder and close MIME4J-66 and -67. +1 Stefano --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
