commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Holger Hoffstätte (JIRA) <>
Subject [jira] Commented: (LANG-287) Optimize StringEscapeUtils.unescapeXml(String)
Date Thu, 01 Feb 2007 09:41:05 GMT


Holger Hoffstätte commented on LANG-287:

I'd like to reopen this: the latest changes in 2.3rc seems to have undone the fix in this
issue because for some reason (convenience?) the actual unescape guard is now wrapped by an
always-created StringWriter - making the whole optimization useless. Previous versions of
the code did not do this. I don't really see the point in forcing the use of a StringWriter
at all? If anything the writer should probably be an optional path, not the main path through
which everything is funneled.

> Optimize StringEscapeUtils.unescapeXml(String)
> ----------------------------------------------
>                 Key: LANG-287
>                 URL:
>             Project: Commons Lang
>          Issue Type: Improvement
>    Affects Versions: 2.2
>            Reporter: Stepan Koltsov
>            Priority: Minor
>             Fix For: 2.3
>         Attachments: commons-lang-unescape-performace-stepancheg-2006-10-24.diff
> StringEscapeUtils.unescapeXml(String) (and other unescaes) works too slowly if String
has nothing to unescape, that is very common situation.
> To make unescape faster, following check should be added to be start of Entities.unescape(str)
> if (str.indexOf('&') < 0)
>     return str;

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:
For additional commands, e-mail:

View raw message