[
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]