You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Markus Wiederkehr (JIRA)" <se...@james.apache.org> on 2009/01/04 19:57:44 UTC

[jira] Created: (MIME4J-96) Field.parse() should defer parsing until the parsed value is actually requested

Field.parse() should defer parsing until the parsed value is actually requested
-------------------------------------------------------------------------------

                 Key: MIME4J-96
                 URL: https://issues.apache.org/jira/browse/MIME4J-96
             Project: JAMES Mime4j
          Issue Type: Improvement
    Affects Versions: 0.5
            Reporter: Markus Wiederkehr
             Fix For: 0.6


Currently the MessageBuilder invokes Field.parse() for every header field of a message. Benchmark tests have shown that this has a significant impact on performance.

For example, DateTimeField parses the Date header into a java.util.Date object regardless if this value is ever needed or not.

-- 
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


[jira] Updated: (MIME4J-96) Field.parse() should defer parsing until the parsed value is actually requested

Posted by "Markus Wiederkehr (JIRA)" <se...@james.apache.org>.
     [ https://issues.apache.org/jira/browse/MIME4J-96?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Markus Wiederkehr updated MIME4J-96:
------------------------------------

    Attachment: DateTimeField.java

Attached a new version of DateTimeField that does not parse the Date header until the value is actually requested.

This change alone reduces the runtime of LongMultipartReadBench #3 from 47 seconds to 35 seconds on my machine.

The other Field subclasses could be refactored in a similar fashion.

If this is acceptable I would also suggest that FieldParser gets renamed in FieldFactory to better describe what it actually is..

> Field.parse() should defer parsing until the parsed value is actually requested
> -------------------------------------------------------------------------------
>
>                 Key: MIME4J-96
>                 URL: https://issues.apache.org/jira/browse/MIME4J-96
>             Project: JAMES Mime4j
>          Issue Type: Improvement
>    Affects Versions: 0.5
>            Reporter: Markus Wiederkehr
>             Fix For: 0.6
>
>         Attachments: DateTimeField.java
>
>
> Currently the MessageBuilder invokes Field.parse() for every header field of a message. Benchmark tests have shown that this has a significant impact on performance.
> For example, DateTimeField parses the Date header into a java.util.Date object regardless if this value is ever needed or not.

-- 
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


[jira] Resolved: (MIME4J-96) Field.parse() should defer parsing until the parsed value is actually requested

Posted by "Markus Wiederkehr (JIRA)" <se...@james.apache.org>.
     [ https://issues.apache.org/jira/browse/MIME4J-96?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Markus Wiederkehr resolved MIME4J-96.
-------------------------------------

    Resolution: Fixed

> Field.parse() should defer parsing until the parsed value is actually requested
> -------------------------------------------------------------------------------
>
>                 Key: MIME4J-96
>                 URL: https://issues.apache.org/jira/browse/MIME4J-96
>             Project: JAMES Mime4j
>          Issue Type: Improvement
>    Affects Versions: 0.5
>            Reporter: Markus Wiederkehr
>            Assignee: Markus Wiederkehr
>             Fix For: 0.6
>
>         Attachments: DateTimeField.java
>
>
> Currently the MessageBuilder invokes Field.parse() for every header field of a message. Benchmark tests have shown that this has a significant impact on performance.
> For example, DateTimeField parses the Date header into a java.util.Date object regardless if this value is ever needed or not.

-- 
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


[jira] Assigned: (MIME4J-96) Field.parse() should defer parsing until the parsed value is actually requested

Posted by "Markus Wiederkehr (JIRA)" <se...@james.apache.org>.
     [ https://issues.apache.org/jira/browse/MIME4J-96?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Markus Wiederkehr reassigned MIME4J-96:
---------------------------------------

    Assignee: Markus Wiederkehr

> Field.parse() should defer parsing until the parsed value is actually requested
> -------------------------------------------------------------------------------
>
>                 Key: MIME4J-96
>                 URL: https://issues.apache.org/jira/browse/MIME4J-96
>             Project: JAMES Mime4j
>          Issue Type: Improvement
>    Affects Versions: 0.5
>            Reporter: Markus Wiederkehr
>            Assignee: Markus Wiederkehr
>             Fix For: 0.6
>
>         Attachments: DateTimeField.java
>
>
> Currently the MessageBuilder invokes Field.parse() for every header field of a message. Benchmark tests have shown that this has a significant impact on performance.
> For example, DateTimeField parses the Date header into a java.util.Date object regardless if this value is ever needed or not.

-- 
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


[jira] Commented: (MIME4J-96) Field.parse() should defer parsing until the parsed value is actually requested

Posted by "Markus Wiederkehr (JIRA)" <se...@james.apache.org>.
    [ https://issues.apache.org/jira/browse/MIME4J-96?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12661271#action_12661271 ] 

Markus Wiederkehr commented on MIME4J-96:
-----------------------------------------

Patch applied. The test now runs under 22 seconds on my machine.

> Field.parse() should defer parsing until the parsed value is actually requested
> -------------------------------------------------------------------------------
>
>                 Key: MIME4J-96
>                 URL: https://issues.apache.org/jira/browse/MIME4J-96
>             Project: JAMES Mime4j
>          Issue Type: Improvement
>    Affects Versions: 0.5
>            Reporter: Markus Wiederkehr
>            Assignee: Markus Wiederkehr
>             Fix For: 0.6
>
>         Attachments: DateTimeField.java
>
>
> Currently the MessageBuilder invokes Field.parse() for every header field of a message. Benchmark tests have shown that this has a significant impact on performance.
> For example, DateTimeField parses the Date header into a java.util.Date object regardless if this value is ever needed or not.

-- 
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