[
https://issues.apache.org/jira/browse/XALANJ-2581?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gary Gregory updated XALANJ-2581:
---------------------------------
Description:
Minor performance improvement:
- Use String.lastIndexOf(int) instead of String.lastIndexOf(String).
- Use the char version of StringBuffer.append() and String.indexOf().
- Make ObjectFactory classes final.
- Eliminate call to inefficient String(String) constructor.
- Eliminate creation of temporary strings in loops.
- Iterate over the entries a the map instead of the keys. This avoids a
redundant table lookup for each value.
- String.length() == 0 tends to be slightly faster than String.equals("").
was:
Minor performance improvement:
- Use String.lastIndexOf(int) instead of String.lastIndexOf(String).
- Use the char version of StringBuffer.append() and String.indexOf().
- Make ObjectFactory classes final.
- Eliminate call to inefficient String(String) constructor.
- Eliminate creation of temporary strings in loops.
- Iterate over the entries a the map instead of the keys. This avoids a
redundant table lookup for each value.
> Minor performance improvement: Use String.lastIndexOf(int) instead of
> String.lastIndexOf(String).
> -------------------------------------------------------------------------------------------------
>
> Key: XALANJ-2581
> URL: https://issues.apache.org/jira/browse/XALANJ-2581
> Project: XalanJ2
> Issue Type: Improvement
> Security Level: No security risk; visible to anyone(Ordinary problems in
> Xalan projects. Anybody can view the issue.)
> Affects Versions: 2.7.1
> Reporter: Gary Gregory
> Assignee: Steven J. Hathaway
> Fix For: 2.7.2
>
>
> Minor performance improvement:
> - Use String.lastIndexOf(int) instead of String.lastIndexOf(String).
> - Use the char version of StringBuffer.append() and String.indexOf().
> - Make ObjectFactory classes final.
> - Eliminate call to inefficient String(String) constructor.
> - Eliminate creation of temporary strings in loops.
> - Iterate over the entries a the map instead of the keys. This avoids a
> redundant table lookup for each value.
> - String.length() == 0 tends to be slightly faster than String.equals("").
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]