You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Cédrik LIME (JIRA)" <ji...@apache.org> on 2006/10/24 11:42:16 UTC
[jira] Created: (EMAIL-60) Performance in HtmlEmail#setMsg(String
msg)
Performance in HtmlEmail#setMsg(String msg)
-------------------------------------------
Key: EMAIL-60
URL: http://issues.apache.org/jira/browse/EMAIL-60
Project: Commons Email
Issue Type: Improvement
Affects Versions: 1.0 Final
Reporter: Cédrik LIME
Priority: Minor
The method HtmlEmail.setMsg(String) builds an HTML message from a text message using a StringBuffer. This StringBuffer should be correctly sized according to inputted message, to avoid unnecessary resizing:
138c138
< new StringBuffer()
---
> new StringBuffer(msg.length() + 37)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Updated: (EMAIL-60) Performance in HtmlEmail#setMsg(String
msg)
Posted by "Ben Speakmon (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/EMAIL-60?page=all ]
Ben Speakmon updated EMAIL-60:
------------------------------
Attachment: HtmlEmail.patch
Here's a better patch that calculates the exact size of the StringBuffer. Also, it turns the constant strings into static constants.
> Performance in HtmlEmail#setMsg(String msg)
> -------------------------------------------
>
> Key: EMAIL-60
> URL: http://issues.apache.org/jira/browse/EMAIL-60
> Project: Commons Email
> Issue Type: Improvement
> Affects Versions: 1.0
> Reporter: Cédrik LIME
> Priority: Minor
> Attachments: HtmlEmail.patch
>
>
> The method HtmlEmail.setMsg(String) builds an HTML message from a text message using a StringBuffer. This StringBuffer should be correctly sized according to inputted message, to avoid unnecessary resizing:
> 138c138
> < new StringBuffer()
> ---
> > new StringBuffer(msg.length() + 37)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org
[jira] Closed: (EMAIL-60) Performance in HtmlEmail#setMsg(String
msg)
Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/EMAIL-60?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Yandell closed EMAIL-60.
------------------------------
Resolution: Fixed
Fix Version/s: 1.1
svn ci -m "Applying performance enhancement requested in EMAIL-60"
Sending src/java/org/apache/commons/mail/HtmlEmail.java
Transmitting file data .
Committed revision 501739.
> Performance in HtmlEmail#setMsg(String msg)
> -------------------------------------------
>
> Key: EMAIL-60
> URL: https://issues.apache.org/jira/browse/EMAIL-60
> Project: Commons Email
> Issue Type: Improvement
> Affects Versions: 1.0
> Reporter: Cédrik LIME
> Priority: Minor
> Fix For: 1.1
>
> Attachments: HtmlEmail.patch
>
>
> The method HtmlEmail.setMsg(String) builds an HTML message from a text message using a StringBuffer. This StringBuffer should be correctly sized according to inputted message, to avoid unnecessary resizing:
> 138c138
> < new StringBuffer()
> ---
> > new StringBuffer(msg.length() + 37)
--
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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org