-
Notifications
You must be signed in to change notification settings - Fork 277
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
Remove unused Method handles from Hibernate instrumentation #3496
Conversation
… in the decorator (except for method name which byte-buddy makes available in cached form by using '#m') Removing them should reduce tracer overhead on every hibernate call. (* see warning in the @Advice.Origin javadoc)
@@ -25,7 +24,6 @@ public class SessionMethodUtils { | |||
public static <TARGET, ENTITY> SessionState startScopeFrom( | |||
final ContextStore<TARGET, SessionState> contextStore, | |||
final TARGET spanKey, | |||
final Method origin, |
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.
I wonder if there was intent to use this at some point. Nice catch!
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.
From the git
history it looks like a leftover from changes to reduce the cost of computing the operationName
.
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.
🎉
@@ -25,7 +24,6 @@ public class SessionMethodUtils { | |||
public static <TARGET, ENTITY> SessionState startScopeFrom( | |||
final ContextStore<TARGET, SessionState> contextStore, | |||
final TARGET spanKey, | |||
final Method origin, |
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.
From the git
history it looks like a leftover from changes to reduce the cost of computing the operationName
.
These jlr.Method values are recreated* on every read and are not used in the decorator
(except for method name which byte-buddy makes available in cached form by using '#m')
Removing them should reduce tracer overhead on every hibernate call.
* see warning in the @Advice.Origin javadoc