New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
T minor performance tweaks #720
T minor performance tweaks #720
Conversation
@@ -67,6 +69,13 @@ | |||
private CommandsFactory cf; | |||
private RpcManager rpcManager; | |||
|
|||
private static final Log log = LogFactory.getLog(OptimisticLockingInterceptor.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong one!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, but please fix this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
@galderz nope. The isStandaloneCache() check didn't suppress the registration of the listener. So the listener was registered anyway. And this is a hotspot when using a standalone cache (checking the listener, annotations, reflection to extract the annotated methods, etc). |
About the other comments re: logging:
|
@Sanne I completely agree that getLog() will never perform as good as log, but at least it means we get (a) correct info as to which interceptor is in use and at the same time (b) we don't create a separate logger per interceptor instance, but rather one per interceptor type. |
Ok; just waiting for the fix of the copy/paste issue of class name. |
…tered! Otherwise we don't care. XX
@Sanne done |
well well.. you edited the wrong commit ;) merging anyway.. |
@maniksurtani hey there was no issue associated ?? imho you should definitely track such changes |
The first commit makes us a few % faster on startup. The second makes us a lot faster if starting up transactional, LOCAL mode caches (common for Hibernate 2LC)