[ https://issues.apache.org/jira/browse/LANG-287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12470747 ]
Henri Yandell commented on LANG-287: ------------------------------------ LANG-102 was the issue in question that changed the code. There was lots of duplicate functionality and we'd had bugs that had been fixed in one variant and not the other. Using the current trunk and the current trunk with LANG-102 rolled back, I get the same numbers for my previous (rewritten) test of 1,000 iterations of 100,000 length strings - one with 10,000 >s and one without. The new code is 10 times slower for the case of not having anything to escape. It's about 10% faster for the case of having >s to escape, dropping about half a second below 10 seconds. So that's interesting. Hopefully I can fix the first without hurting the second :) > Optimize StringEscapeUtils.unescapeXml(String) > ---------------------------------------------- > > Key: LANG-287 > URL: https://issues.apache.org/jira/browse/LANG-287 > 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]