[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2122) optimization patch based on pmd rules
Max Rydahl Andersen (JIRA)
noreply at atlassian.com
Sat Sep 30 02:17:24 EDT 2006
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2122?page=comments#action_24684 ]
Max Rydahl Andersen commented on HHH-2122:
------------------------------------------
so you of course measured a performance difference before and after the patch applied ? What were the results ?
> optimization patch based on pmd rules
> -------------------------------------
>
> Key: HHH-2122
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2122
> Project: Hibernate3
> Type: Patch
> Environment: latest svn source
> Reporter: Xavier Le Vourch
> Priority: Minor
> Attachments: Optimizations.patch
>
>
> I've run pmd with a custom ruleset and made a few optimization changes:
> Double.valueOf(x).doubleValue() -> Double.parseDouble(x)
> append("x") -> append('x')
> x != null && x instanceof X -> x instanceof X
> list.toArray uses correctly sized array as argument
> new String(str) -> str
> if (expr == false) -> if (!expr)
> append(s1 + s2) -> append(s1).append(s2)
> loop over array to add to list -> list.addAll(Arrays.asList(<array>))
> extra ; removed
> name.toLowerCase().equals("rowid") -> name.equalsIgnoreCase("rowid")
> use of System.arraycopy instead of loop
> I could break the patch in several parts if that makes it easier to analyze.
> Xavier
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list