"adrian(a)jboss.org" wrote : There's also a simple optimization you can add to
ControllerState.equals()
| Currently it will be doing a string comparison even when the comparison is with
itself. :-(
|
|
| | public boolean equals(Object object)
| | {
| | + if (object == this)
| | + return true;
| | if (object == null || object instanceof ControllerState == false)
| | return false;
| | ControllerState other = (ControllerState) object;
| | return stateString.equals(other.stateString);
| | }
| |
I think I tried this one + doing a check on state string's hash
(checking actual string only if hash's matched; same hash != same state),
but it didn't visible speed things, hence more drastic change is wip.
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4260354#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...