[NEW BUG]: Reduce allocations in sun.reflect.annotation.AnnotationInvocationHandler.invoke()
Christoph Dreis
christoph.dreis at freenet.de
Mon Nov 28 12:35:33 UTC 2016
Hey,
I'm new to the OpenJDK and not sure (yet) how the procedure especially for
new bugs/enhancement is. So I apologise upfront if I made any mistakes.
I'm working mostly with the Spring-Framework/Spring-Boot in my current
projects. In these frameworks a lot of dynamic proxying can happen.
Recently, I noticed that the JDK in versions 8 up to the current snapshots
produces some allocations coming from
sun.reflect.annotation.AnnotationInvocationHandler.invoke() we could avoid
in the majority of cases. Only the check for equality needs the actual
parameter types - all other cases only need the parameter count which JDK 8
luckily provides with Method.getParameterCount().
What about changing the current behaviour to something like my attached
proposal? I'd be happy if someone is willing to sponsor this change. Again -
if I made any mistakes here, please let me know for the next time.
Cheers,
Christoph Dreis
More information about the jdk9-dev
mailing list