Issue 1:
[] I have searched the issues of this repository and believe that this is not a duplicate.

[] I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: 2.5.10

Operating System version: 3.10.0-514.26.2.el7.x86_64 GNU/Linux

Java version: 1.8

Steps to reproduce this issue

benchmark

Description

在对 Dubbo 应用进行压测时，通过 top -Hp {pid} 和 jstack {pid} 进行查看后，发现 Dubbo 客户端有 4 个线程的 CPU 占用比较高，并且线程均在执行 sun.reflect.generics.parser.SignatureParser.current(SignatureParser.java:95)

Suggestion

把 RpcUtils.getReturnTypes(Invocation) 执行结果的 Method 对象缓存下来，避免每次都调用反射 Api：

例如，用 Map<service, Map<methodName, A>> 来缓存，其中 A 中包含 parameterTypes 和 Method 的对应关系

具体线程堆栈如下：

"New I/O client worker #1-5" #63 daemon prio=5 os_prio=0 tid=0x00007fc730003000 nid=0x49db runnable [0x00007fc790c13000]
java.lang.Thread.State: RUNNABLE
at sun.reflect.generics.parser.SignatureParser.current(SignatureParser.java:95)
at sun.reflect.generics.parser.SignatureParser.parseZeroOrMoreThrowsSignatures(SignatureParser.java:633)
at sun.reflect.generics.parser.SignatureParser.parseMethodTypeSignature(SignatureParser.java:578)
at sun.reflect.generics.parser.SignatureParser.parseMethodSig(SignatureParser.java:171)
at sun.reflect.generics.repository.ConstructorRepository.parse(ConstructorRepository.java:55)
at sun.reflect.generics.repository.ConstructorRepository.parse(ConstructorRepository.java:43)
at sun.reflect.generics.repository.AbstractRepository.<init>(AbstractRepository.java:74)
at sun.reflect.generics.repository.GenericDeclRepository.<init>(GenericDeclRepository.java:49)
at sun.reflect.generics.repository.ConstructorRepository.<init>(ConstructorRepository.java:51)
at sun.reflect.generics.repository.MethodRepository.<init>(MethodRepository.java:46)
at sun.reflect.generics.repository.MethodRepository.make(MethodRepository.java:59)
at java.lang.reflect.Method.getGenericInfo(Method.java:102)
at java.lang.reflect.Method.getGenericReturnType(Method.java:255)
at com.alibaba.dubbo.rpc.support.RpcUtils.getReturnTypes(RpcUtils.java:72)
at com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcResult.decode(DecodeableRpcResult.java:79)
at com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcResult.decode(DecodeableRpcResult.java:106)
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboCodec.decodeBody(DubboCodec.java:88)
at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.decode(ExchangeCodec.java:120)
at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.decode(ExchangeCodec.java:81)
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboCountCodec.decode(DubboCountCodec.java:44)
at com.alibaba.dubbo.remoting.transport.netty.NettyCodecAdapter$InternalDecoder.messageReceived(NettyCodecAdapter.java:133)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:349)
at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:280)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:200)
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

"New I/O client worker #1-4" #62 daemon prio=5 os_prio=0 tid=0x00007fc730001000 nid=0x49da runnable [0x00007fc790c94000]
java.lang.Thread.State: RUNNABLE
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114)
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:125)
at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:49)
at sun.reflect.generics.repository.MethodRepository.getReturnType(MethodRepository.java:68)
at java.lang.reflect.Method.getGenericReturnType(Method.java:255)
at com.alibaba.dubbo.rpc.support.RpcUtils.getReturnTypes(RpcUtils.java:72)
at com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcResult.decode(DecodeableRpcResult.java:79)
at com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcResult.decode(DecodeableRpcResult.java:106)
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboCodec.decodeBody(DubboCodec.java:88)
at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.decode(ExchangeCodec.java:120)
at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.decode(ExchangeCodec.java:81)
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboCountCodec.decode(DubboCountCodec.java:44)
at com.alibaba.dubbo.remoting.transport.netty.NettyCodecAdapter$InternalDecoder.messageReceived(NettyCodecAdapter.java:133)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:349)
at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:280)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:200)
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

"New I/O client worker #1-3" #61 daemon prio=5 os_prio=0 tid=0x00007fc73005b800 nid=0x49d9 runnable [0x00007fc790d15000]
java.lang.Thread.State: RUNNABLE
at sun.reflect.generics.parser.SignatureParser.current(SignatureParser.java:95)
at sun.reflect.generics.parser.SignatureParser.parseZeroOrMoreThrowsSignatures(SignatureParser.java:633)
at sun.reflect.generics.parser.SignatureParser.parseMethodTypeSignature(SignatureParser.java:578)
at sun.reflect.generics.parser.SignatureParser.parseMethodSig(SignatureParser.java:171)
at sun.reflect.generics.repository.ConstructorRepository.parse(ConstructorRepository.java:55)
at sun.reflect.generics.repository.ConstructorRepository.parse(ConstructorRepository.java:43)
at sun.reflect.generics.repository.AbstractRepository.<init>(AbstractRepository.java:74)
at sun.reflect.generics.repository.GenericDeclRepository.<init>(GenericDeclRepository.java:49)
at sun.reflect.generics.repository.ConstructorRepository.<init>(ConstructorRepository.java:51)
at sun.reflect.generics.repository.MethodRepository.<init>(MethodRepository.java:46)
at sun.reflect.generics.repository.MethodRepository.make(MethodRepository.java:59)
at java.lang.reflect.Method.getGenericInfo(Method.java:102)
at java.lang.reflect.Method.getGenericReturnType(Method.java:255)
at com.alibaba.dubbo.rpc.support.RpcUtils.getReturnTypes(RpcUtils.java:72)
at com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcResult.decode(DecodeableRpcResult.java:79)
at com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcResult.decode(DecodeableRpcResult.java:106)
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboCodec.decodeBody(DubboCodec.java:88)
at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.decode(ExchangeCodec.java:120)
at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.decode(ExchangeCodec.java:81)
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboCountCodec.decode(DubboCountCodec.java:44)
at com.alibaba.dubbo.remoting.transport.netty.NettyCodecAdapter$InternalDecoder.messageReceived(NettyCodecAdapter.java:133)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:349)
at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:280)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:200)
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

"New I/O client worker #1-2" #59 daemon prio=5 os_prio=0 tid=0x00007fc730041000 nid=0x49d7 runnable [0x00007fc790e17000]
java.lang.Thread.State: RUNNABLE
at sun.reflect.generics.parser.SignatureParser.current(SignatureParser.java:95)
at sun.reflect.generics.parser.SignatureParser.parseZeroOrMoreThrowsSignatures(SignatureParser.java:633)
at sun.reflect.generics.parser.SignatureParser.parseMethodTypeSignature(SignatureParser.java:578)
at sun.reflect.generics.parser.SignatureParser.parseMethodSig(SignatureParser.java:171)
at sun.reflect.generics.repository.ConstructorRepository.parse(ConstructorRepository.java:55)
at sun.reflect.generics.repository.ConstructorRepository.parse(ConstructorRepository.java:43)
at sun.reflect.generics.repository.AbstractRepository.<init>(AbstractRepository.java:74)
at sun.reflect.generics.repository.GenericDeclRepository.<init>(GenericDeclRepository.java:49)
at sun.reflect.generics.repository.ConstructorRepository.<init>(ConstructorRepository.java:51)
at sun.reflect.generics.repository.MethodRepository.<init>(MethodRepository.java:46)
at sun.reflect.generics.repository.MethodRepository.make(MethodRepository.java:59)
at java.lang.reflect.Method.getGenericInfo(Method.java:102)
at java.lang.reflect.Method.getGenericReturnType(Method.java:255)
at com.alibaba.dubbo.rpc.support.RpcUtils.getReturnTypes(RpcUtils.java:72)
at com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcResult.decode(DecodeableRpcResult.java:79)
at com.alibaba.dubbo.rpc.protocol.dubbo.DecodeableRpcResult.decode(DecodeableRpcResult.java:106)
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboCodec.decodeBody(DubboCodec.java:88)
at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.decode(ExchangeCodec.java:120)
at com.alibaba.dubbo.remoting.exchange.codec.ExchangeCodec.decode(ExchangeCodec.java:81)
at com.alibaba.dubbo.rpc.protocol.dubbo.DubboCountCodec.decode(DubboCountCodec.java:44)
at com.alibaba.dubbo.remoting.transport.netty.NettyCodecAdapter$InternalDecoder.messageReceived(NettyCodecAdapter.java:133)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:274)
at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:261)
at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:349)
at org.jboss.netty.channel.socket.nio.NioWorker.processSelectedKeys(NioWorker.java:280)
at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:200)
at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Issue 2:
I have searched the issues of this repository and believe that this is not a duplicate.

I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

Dubbo version: xxx

Operating System version: xxx

Java version: xxx

Steps to reproduce this issue

xxx

xxx

xxx

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

What do you expected from the above steps？

Actual Result

What actually happens?

If there is an exception, please attach the exception trace:

Just put your stack trace here!