<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.9-SNAPSHOT</li>
<li>Operating System version: Mac OS X</li>
<li>Java version: jdk1.8.0_211</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<ol dir="auto">
<li><a href="http://dubbo.apache.org/zh-cn/docs/dev/design.html" rel="nofollow">http://dubbo.apache.org/zh-cn/docs/dev/design.html</a></li>
</ol>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/39361661/93200956-1565f000-f783-11ea-8899-fb87ab879b85.png"><img width="1114" alt="image" src="https://user-images.githubusercontent.com/39361661/93200956-1565f000-f783-11ea-8899-fb87ab879b85.png" style="max-width: 100%;"></a></p>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">Consumer 调用经过的第一个 filter 未处理缓存相关的 filter.在调试中发现在 loadBalance 之后才进行 cacheFilter 的过滤.</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">猜测是未更新文档.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
</code></pre></div>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/39361661/93201288-90c7a180-f783-11ea-9e6c-7fd062408664.png"><img src="https://user-images.githubusercontent.com/39361661/93201288-90c7a180-f783-11ea-9e6c-7fd062408664.png" alt="截屏2020-09-15 下午3 13 33" style="max-width: 100%;"></a></p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.4.1</li>
<li>Operating System version: �centos 6.8</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Steps to reproduce this issue</h3>
<p dir="auto">使用dubbo 2.7.4.1进行dubbo泛化同步调用，相比使用dubbo 2.6.2进行dubbo泛化同步调用，2.7.4.1的QPS大概是2.6.2的60%，配置相同，只是高版本某些命名空间不同，是还有什么配置吗？</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="public class DubboProxyService {


    private final Map&lt;String, ApplicationConfig&gt; APPLICATION_CONFIG_MAP = new ConcurrentHashMap&lt;&gt;();

    private final Map&lt;String, List&lt;RegistryConfig&gt;&gt; REGISTRY_CONFIG_MAP = new ConcurrentHashMap&lt;&gt;();

    private final List&lt;String&gt; DUBBO_LOADBALANCE_LIST = new ArrayList&lt;String&gt;() {{
        // com.alibaba.dubbo.rpc.cluster.loadbalance.RandomLoadBalance
        add(&quot;random&quot;);

        // com.alibaba.dubbo.rpc.cluster.loadbalance.RoundRobinLoadBalance
        add(&quot;roundrobin&quot;);

        // com.alibaba.dubbo.rpc.cluster.loadbalance.LeastActiveLoadBalance
        add(&quot;leastactive&quot;);

        // com.alibaba.dubbo.rpc.cluster.loadbalance.ConsistentHashLoadBalance
        add(&quot;consistenthash&quot;);
    }};

    private final Splitter DUBBO_REGISTRIES_SPLITTER = Splitter.on(&quot;,&quot;).omitEmptyStrings().trimResults();

    public Object genericInvoker(final Map&lt;String, Object&gt; paramMap, final DubboSelectorHandle dubboSelectorHandle, final DubboRuleHandler dubboRuleHandler) {

        ReferenceConfig&lt;GenericService&gt; reference = buildReferenceConfig(dubboSelectorHandle, dubboRuleHandler, paramMap.get(Constants.DUBBO_INTERFACE_NAME).toString());

        ReferenceConfigCache configCache = ReferenceConfigCache.getCache();

        GenericService genericService;
        try {
            genericService = configCache.get(reference);

            if (Objects.isNull(genericService)) {
                configCache.destroy(reference);

                throw new RuntimeException(&quot;dubbo genericService has exception&quot;);
            }
        } catch (NullPointerException e) {

            configCache.destroy(reference);

            log.error(&quot;DubboProxyService genericInvoker configCache fail, paramMap={}, cause={}&quot;, paramMap, Throwables.getStackTraceAsString(e));

            throw new RuntimeException(e.getMessage());
        }

        Pair&lt;String[], Object[]&gt; pair = buildParameter(paramMap);

        try {

            //log.info(JsonUtils.toJson(paramMap));
            return genericService.$invoke(paramMap.get(Constants.DUBBO_METHOD).toString(), pair.getLeft(), pair.getRight());
        } catch (GenericException e) {
            log.error(&quot;DubboProxyService genericInvoker $invoke fail, paramMap={}, cause={}&quot;, paramMap, Throwables.getStackTraceAsString(e));

            throw new RuntimeException(e.getMessage());
        }
    }

    private ReferenceConfig&lt;GenericService&gt; buildReferenceConfig(DubboSelectorHandle selectorHandle, DubboRuleHandler ruleHandler, String interfaceName) {

        String appName = selectorHandle.getAppName();

        ReferenceConfig&lt;GenericService&gt; reference = new ReferenceConfig&lt;&gt;();

        reference.setGeneric(true);
        reference.setApplication(APPLICATION_CONFIG_MAP.computeIfAbsent(appName, f -&gt; new ApplicationConfig(appName)));
        reference.setRegistries(REGISTRY_CONFIG_MAP.computeIfAbsent(appName,
                f -&gt; StreamSupport.stream(Optional.of(selectorHandle.getRegistry())
                                                  .map(DUBBO_REGISTRIES_SPLITTER::split)
                                                  .get().spliterator(), false)
                                  .map(s -&gt; &quot;zookeeper://&quot; + s)
                                  .map(RegistryConfig::new)
                                  .collect(Collectors.toList())));
        reference.setInterface(interfaceName);

        Optional.ofNullable(ruleHandler).map(DubboRuleHandler::getTimeout).ifPresent(reference::setTimeout);
        Optional.ofNullable(ruleHandler).map(DubboRuleHandler::getRetries).ifPresent(reference::setRetries);

        Optional.of(selectorHandle).map(DubboSelectorHandle::getProtocol).ifPresent(s -&gt; {
            if (!Strings.isNullOrEmpty(s)) {
                reference.setProtocol(s);
            }
        });
        Optional.ofNullable(ruleHandler).map(DubboRuleHandler::getVersion).ifPresent(s -&gt; {
            if (!Strings.isNullOrEmpty(s)) {
                reference.setVersion(s);
            }
        });
        Optional.ofNullable(ruleHandler).map(DubboRuleHandler::getGroup).ifPresent(s -&gt; {
            if (!Strings.isNullOrEmpty(s)) {
                reference.setGroup(s);
            }
        });
        Optional.ofNullable(ruleHandler).map(DubboRuleHandler::getLoadBalance).ifPresent(s -&gt; {
            if (DUBBO_LOADBALANCE_LIST.contains(s)) {
                reference.setLoadbalance(s);
            }
        });

        //reference.setCluster(&quot;issFailover&quot;);

        reference.setClient(&quot;netty4&quot;);

        return reference;
    }

    private Pair&lt;String[], Object[]&gt; buildParameter(Map&lt;String, Object&gt; paramMap) {

        List&lt;String&gt; parameterTypes = new ArrayList&lt;&gt;();
        List&lt;Object&gt; args = new ArrayList&lt;&gt;();

        if (paramMap.containsKey(Constants.DUBBO_PARAM_CLASS)) {

            List&lt;String&gt; clazz = GsonUtils.getInstance().fromList(paramMap.get(Constants.DUBBO_PARAM_CLASS).toString(), String.class);

            AtomicBoolean hasList = new AtomicBoolean(false);
            clazz.forEach(c -&gt; {
                parameterTypes.add(c);
                if (List.class.getName().equals(c)) {
                    hasList.set(true);
                }
            });

            if (hasList.get()) {
                String classParams = paramMap.get(Constants.DUBBO_CLASS_PARAMS).toString();

                List&lt;Map&gt; params = GsonUtils.getInstance().toListMap(classParams);
                args.add(params);
            } else {

                String classParams = paramMap.get(Constants.DUBBO_CLASS_PARAMS).toString();
                args.addAll(GsonUtils.getInstance().fromJson(classParams, List.class));
            }
        }

        if (paramMap.containsKey(Constants.DUBBO_GENERIC_PARAMS) &amp;&amp; !&quot;null&quot;.equals(paramMap.get(Constants.DUBBO_GENERIC_PARAMS).toString())) {

            Map&lt;String, Object&gt; map = GsonUtils.getInstance().toObjectMap(paramMap.get(Constants.DUBBO_GENERIC_PARAMS).toString());

            map.forEach((k, v) -&gt; {

                if (v instanceof JsonArray) {
                    List&lt;String&gt; arg = GsonUtils.getInstance().fromList(v.toString(), String.class);

                    arg.forEach(a -&gt; {
                        parameterTypes.add(k);
                        args.add(a);
                    });

                } else {
                    parameterTypes.add(k);
                    args.add(v);
                }
            });

        }

        return Pair.of(parameterTypes.toArray(new String[0]), args.toArray());
    }

}"><pre class="notranslate"><span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">DubboProxyService</span> {


    <span class="pl-k">private</span> <span class="pl-k">final</span> <span class="pl-smi">Map</span>&lt;<span class="pl-smi">String</span>, <span class="pl-smi">ApplicationConfig</span>&gt; <span class="pl-c1">APPLICATION_CONFIG_MAP</span> = <span class="pl-k">new</span> <span class="pl-smi">ConcurrentHashMap</span>&lt;&gt;();

    <span class="pl-k">private</span> <span class="pl-k">final</span> <span class="pl-smi">Map</span>&lt;<span class="pl-smi">String</span>, <span class="pl-smi">List</span>&lt;<span class="pl-smi">RegistryConfig</span>&gt;&gt; <span class="pl-c1">REGISTRY_CONFIG_MAP</span> = <span class="pl-k">new</span> <span class="pl-smi">ConcurrentHashMap</span>&lt;&gt;();

    <span class="pl-k">private</span> <span class="pl-k">final</span> <span class="pl-smi">List</span>&lt;<span class="pl-smi">String</span>&gt; <span class="pl-c1">DUBBO_LOADBALANCE_LIST</span> = <span class="pl-k">new</span> <span class="pl-smi">ArrayList</span>&lt;<span class="pl-smi">String</span>&gt;() {{
        <span class="pl-c">// com.alibaba.dubbo.rpc.cluster.loadbalance.RandomLoadBalance</span>
        <span class="pl-en">add</span>(<span class="pl-s">"random"</span>);

        <span class="pl-c">// com.alibaba.dubbo.rpc.cluster.loadbalance.RoundRobinLoadBalance</span>
        <span class="pl-en">add</span>(<span class="pl-s">"roundrobin"</span>);

        <span class="pl-c">// com.alibaba.dubbo.rpc.cluster.loadbalance.LeastActiveLoadBalance</span>
        <span class="pl-en">add</span>(<span class="pl-s">"leastactive"</span>);

        <span class="pl-c">// com.alibaba.dubbo.rpc.cluster.loadbalance.ConsistentHashLoadBalance</span>
        <span class="pl-en">add</span>(<span class="pl-s">"consistenthash"</span>);
    }};

    <span class="pl-k">private</span> <span class="pl-k">final</span> <span class="pl-smi">Splitter</span> <span class="pl-c1">DUBBO_REGISTRIES_SPLITTER</span> = <span class="pl-smi">Splitter</span>.<span class="pl-en">on</span>(<span class="pl-s">","</span>).<span class="pl-en">omitEmptyStrings</span>().<span class="pl-en">trimResults</span>();

    <span class="pl-k">public</span> <span class="pl-smi">Object</span> <span class="pl-en">genericInvoker</span>(<span class="pl-k">final</span> <span class="pl-smi">Map</span>&lt;<span class="pl-smi">String</span>, <span class="pl-smi">Object</span>&gt; <span class="pl-s1">paramMap</span>, <span class="pl-k">final</span> <span class="pl-smi">DubboSelectorHandle</span> <span class="pl-s1">dubboSelectorHandle</span>, <span class="pl-k">final</span> <span class="pl-smi">DubboRuleHandler</span> <span class="pl-s1">dubboRuleHandler</span>) {

        <span class="pl-smi">ReferenceConfig</span>&lt;<span class="pl-smi">GenericService</span>&gt; <span class="pl-s1">reference</span> = <span class="pl-en">buildReferenceConfig</span>(<span class="pl-s1">dubboSelectorHandle</span>, <span class="pl-s1">dubboRuleHandler</span>, <span class="pl-s1">paramMap</span>.<span class="pl-en">get</span>(<span class="pl-smi">Constants</span>.<span class="pl-c1">DUBBO_INTERFACE_NAME</span>).<span class="pl-en">toString</span>());

        <span class="pl-smi">ReferenceConfigCache</span> <span class="pl-s1">configCache</span> = <span class="pl-smi">ReferenceConfigCache</span>.<span class="pl-en">getCache</span>();

        <span class="pl-smi">GenericService</span> <span class="pl-s1">genericService</span>;
        <span class="pl-k">try</span> {
            <span class="pl-s1">genericService</span> = <span class="pl-s1">configCache</span>.<span class="pl-en">get</span>(<span class="pl-s1">reference</span>);

            <span class="pl-k">if</span> (<span class="pl-smi">Objects</span>.<span class="pl-en">isNull</span>(<span class="pl-s1">genericService</span>)) {
                <span class="pl-s1">configCache</span>.<span class="pl-en">destroy</span>(<span class="pl-s1">reference</span>);

                <span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-smi">RuntimeException</span>(<span class="pl-s">"dubbo genericService has exception"</span>);
            }
        } <span class="pl-k">catch</span> (<span class="pl-smi">NullPointerException</span> <span class="pl-s1">e</span>) {

            <span class="pl-s1">configCache</span>.<span class="pl-en">destroy</span>(<span class="pl-s1">reference</span>);

            <span class="pl-s1">log</span>.<span class="pl-en">error</span>(<span class="pl-s">"DubboProxyService genericInvoker configCache fail, paramMap={}, cause={}"</span>, <span class="pl-s1">paramMap</span>, <span class="pl-smi">Throwables</span>.<span class="pl-en">getStackTraceAsString</span>(<span class="pl-s1">e</span>));

            <span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-smi">RuntimeException</span>(<span class="pl-s1">e</span>.<span class="pl-en">getMessage</span>());
        }

        <span class="pl-smi">Pair</span>&lt;<span class="pl-smi">String</span>[], <span class="pl-smi">Object</span>[]&gt; <span class="pl-s1">pair</span> = <span class="pl-en">buildParameter</span>(<span class="pl-s1">paramMap</span>);

        <span class="pl-k">try</span> {

            <span class="pl-c">//log.info(JsonUtils.toJson(paramMap));</span>
            <span class="pl-k">return</span> <span class="pl-s1">genericService</span>.<span class="pl-en">$invoke</span>(<span class="pl-s1">paramMap</span>.<span class="pl-en">get</span>(<span class="pl-smi">Constants</span>.<span class="pl-c1">DUBBO_METHOD</span>).<span class="pl-en">toString</span>(), <span class="pl-s1">pair</span>.<span class="pl-en">getLeft</span>(), <span class="pl-s1">pair</span>.<span class="pl-en">getRight</span>());
        } <span class="pl-k">catch</span> (<span class="pl-smi">GenericException</span> <span class="pl-s1">e</span>) {
            <span class="pl-s1">log</span>.<span class="pl-en">error</span>(<span class="pl-s">"DubboProxyService genericInvoker $invoke fail, paramMap={}, cause={}"</span>, <span class="pl-s1">paramMap</span>, <span class="pl-smi">Throwables</span>.<span class="pl-en">getStackTraceAsString</span>(<span class="pl-s1">e</span>));

            <span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-smi">RuntimeException</span>(<span class="pl-s1">e</span>.<span class="pl-en">getMessage</span>());
        }
    }

    <span class="pl-k">private</span> <span class="pl-smi">ReferenceConfig</span>&lt;<span class="pl-smi">GenericService</span>&gt; <span class="pl-en">buildReferenceConfig</span>(<span class="pl-smi">DubboSelectorHandle</span> <span class="pl-s1">selectorHandle</span>, <span class="pl-smi">DubboRuleHandler</span> <span class="pl-s1">ruleHandler</span>, <span class="pl-smi">String</span> <span class="pl-s1">interfaceName</span>) {

        <span class="pl-smi">String</span> <span class="pl-s1">appName</span> = <span class="pl-s1">selectorHandle</span>.<span class="pl-en">getAppName</span>();

        <span class="pl-smi">ReferenceConfig</span>&lt;<span class="pl-smi">GenericService</span>&gt; <span class="pl-s1">reference</span> = <span class="pl-k">new</span> <span class="pl-smi">ReferenceConfig</span>&lt;&gt;();

        <span class="pl-s1">reference</span>.<span class="pl-en">setGeneric</span>(<span class="pl-c1">true</span>);
        <span class="pl-s1">reference</span>.<span class="pl-en">setApplication</span>(<span class="pl-smi">APPLICATION_CONFIG_MAP</span>.<span class="pl-en">computeIfAbsent</span>(<span class="pl-s1">appName</span>, <span class="pl-s1">f</span> -&gt; <span class="pl-k">new</span> <span class="pl-smi">ApplicationConfig</span>(<span class="pl-s1">appName</span>)));
        <span class="pl-s1">reference</span>.<span class="pl-en">setRegistries</span>(<span class="pl-smi">REGISTRY_CONFIG_MAP</span>.<span class="pl-en">computeIfAbsent</span>(<span class="pl-s1">appName</span>,
                <span class="pl-s1">f</span> -&gt; <span class="pl-smi">StreamSupport</span>.<span class="pl-en">stream</span>(<span class="pl-smi">Optional</span>.<span class="pl-en">of</span>(<span class="pl-s1">selectorHandle</span>.<span class="pl-en">getRegistry</span>())
                                                  .<span class="pl-en">map</span>(<span class="pl-smi">DUBBO_REGISTRIES_SPLITTER</span>::<span class="pl-s1">split</span>)
                                                  .<span class="pl-en">get</span>().<span class="pl-en">spliterator</span>(), <span class="pl-c1">false</span>)
                                  .<span class="pl-en">map</span>(<span class="pl-s1">s</span> -&gt; <span class="pl-s">"zookeeper://"</span> + <span class="pl-s1">s</span>)
                                  .<span class="pl-en">map</span>(<span class="pl-smi">RegistryConfig</span>::<span class="pl-k">new</span>)
                                  .<span class="pl-en">collect</span>(<span class="pl-smi">Collectors</span>.<span class="pl-en">toList</span>())));
        <span class="pl-s1">reference</span>.<span class="pl-en">setInterface</span>(<span class="pl-s1">interfaceName</span>);

        <span class="pl-smi">Optional</span>.<span class="pl-en">ofNullable</span>(<span class="pl-s1">ruleHandler</span>).<span class="pl-en">map</span>(<span class="pl-smi">DubboRuleHandler</span>::<span class="pl-s1">getTimeout</span>).<span class="pl-en">ifPresent</span>(<span class="pl-s1">reference</span>::<span class="pl-s1">setTimeout</span>);
        <span class="pl-smi">Optional</span>.<span class="pl-en">ofNullable</span>(<span class="pl-s1">ruleHandler</span>).<span class="pl-en">map</span>(<span class="pl-smi">DubboRuleHandler</span>::<span class="pl-s1">getRetries</span>).<span class="pl-en">ifPresent</span>(<span class="pl-s1">reference</span>::<span class="pl-s1">setRetries</span>);

        <span class="pl-smi">Optional</span>.<span class="pl-en">of</span>(<span class="pl-s1">selectorHandle</span>).<span class="pl-en">map</span>(<span class="pl-smi">DubboSelectorHandle</span>::<span class="pl-s1">getProtocol</span>).<span class="pl-en">ifPresent</span>(<span class="pl-s1">s</span> -&gt; {
            <span class="pl-k">if</span> (!<span class="pl-smi">Strings</span>.<span class="pl-en">isNullOrEmpty</span>(<span class="pl-s1">s</span>)) {
                <span class="pl-s1">reference</span>.<span class="pl-en">setProtocol</span>(<span class="pl-s1">s</span>);
            }
        });
        <span class="pl-smi">Optional</span>.<span class="pl-en">ofNullable</span>(<span class="pl-s1">ruleHandler</span>).<span class="pl-en">map</span>(<span class="pl-smi">DubboRuleHandler</span>::<span class="pl-s1">getVersion</span>).<span class="pl-en">ifPresent</span>(<span class="pl-s1">s</span> -&gt; {
            <span class="pl-k">if</span> (!<span class="pl-smi">Strings</span>.<span class="pl-en">isNullOrEmpty</span>(<span class="pl-s1">s</span>)) {
                <span class="pl-s1">reference</span>.<span class="pl-en">setVersion</span>(<span class="pl-s1">s</span>);
            }
        });
        <span class="pl-smi">Optional</span>.<span class="pl-en">ofNullable</span>(<span class="pl-s1">ruleHandler</span>).<span class="pl-en">map</span>(<span class="pl-smi">DubboRuleHandler</span>::<span class="pl-s1">getGroup</span>).<span class="pl-en">ifPresent</span>(<span class="pl-s1">s</span> -&gt; {
            <span class="pl-k">if</span> (!<span class="pl-smi">Strings</span>.<span class="pl-en">isNullOrEmpty</span>(<span class="pl-s1">s</span>)) {
                <span class="pl-s1">reference</span>.<span class="pl-en">setGroup</span>(<span class="pl-s1">s</span>);
            }
        });
        <span class="pl-smi">Optional</span>.<span class="pl-en">ofNullable</span>(<span class="pl-s1">ruleHandler</span>).<span class="pl-en">map</span>(<span class="pl-smi">DubboRuleHandler</span>::<span class="pl-s1">getLoadBalance</span>).<span class="pl-en">ifPresent</span>(<span class="pl-s1">s</span> -&gt; {
            <span class="pl-k">if</span> (<span class="pl-smi">DUBBO_LOADBALANCE_LIST</span>.<span class="pl-en">contains</span>(<span class="pl-s1">s</span>)) {
                <span class="pl-s1">reference</span>.<span class="pl-en">setLoadbalance</span>(<span class="pl-s1">s</span>);
            }
        });

        <span class="pl-c">//reference.setCluster("issFailover");</span>

        <span class="pl-s1">reference</span>.<span class="pl-en">setClient</span>(<span class="pl-s">"netty4"</span>);

        <span class="pl-k">return</span> <span class="pl-s1">reference</span>;
    }

    <span class="pl-k">private</span> <span class="pl-smi">Pair</span>&lt;<span class="pl-smi">String</span>[], <span class="pl-smi">Object</span>[]&gt; <span class="pl-en">buildParameter</span>(<span class="pl-smi">Map</span>&lt;<span class="pl-smi">String</span>, <span class="pl-smi">Object</span>&gt; <span class="pl-s1">paramMap</span>) {

        <span class="pl-smi">List</span>&lt;<span class="pl-smi">String</span>&gt; <span class="pl-s1">parameterTypes</span> = <span class="pl-k">new</span> <span class="pl-smi">ArrayList</span>&lt;&gt;();
        <span class="pl-smi">List</span>&lt;<span class="pl-smi">Object</span>&gt; <span class="pl-s1">args</span> = <span class="pl-k">new</span> <span class="pl-smi">ArrayList</span>&lt;&gt;();

        <span class="pl-k">if</span> (<span class="pl-s1">paramMap</span>.<span class="pl-en">containsKey</span>(<span class="pl-smi">Constants</span>.<span class="pl-c1">DUBBO_PARAM_CLASS</span>)) {

            <span class="pl-smi">List</span>&lt;<span class="pl-smi">String</span>&gt; <span class="pl-s1">clazz</span> = <span class="pl-smi">GsonUtils</span>.<span class="pl-en">getInstance</span>().<span class="pl-en">fromList</span>(<span class="pl-s1">paramMap</span>.<span class="pl-en">get</span>(<span class="pl-smi">Constants</span>.<span class="pl-c1">DUBBO_PARAM_CLASS</span>).<span class="pl-en">toString</span>(), <span class="pl-smi">String</span>.<span class="pl-k">class</span>);

            <span class="pl-smi">AtomicBoolean</span> <span class="pl-s1">hasList</span> = <span class="pl-k">new</span> <span class="pl-smi">AtomicBoolean</span>(<span class="pl-c1">false</span>);
            <span class="pl-s1">clazz</span>.<span class="pl-en">forEach</span>(<span class="pl-s1">c</span> -&gt; {
                <span class="pl-s1">parameterTypes</span>.<span class="pl-en">add</span>(<span class="pl-s1">c</span>);
                <span class="pl-k">if</span> (<span class="pl-smi">List</span>.<span class="pl-k">class</span>.<span class="pl-en">getName</span>().<span class="pl-en">equals</span>(<span class="pl-s1">c</span>)) {
                    <span class="pl-s1">hasList</span>.<span class="pl-en">set</span>(<span class="pl-c1">true</span>);
                }
            });

            <span class="pl-k">if</span> (<span class="pl-s1">hasList</span>.<span class="pl-en">get</span>()) {
                <span class="pl-smi">String</span> <span class="pl-s1">classParams</span> = <span class="pl-s1">paramMap</span>.<span class="pl-en">get</span>(<span class="pl-smi">Constants</span>.<span class="pl-c1">DUBBO_CLASS_PARAMS</span>).<span class="pl-en">toString</span>();

                <span class="pl-smi">List</span>&lt;<span class="pl-smi">Map</span>&gt; <span class="pl-s1">params</span> = <span class="pl-smi">GsonUtils</span>.<span class="pl-en">getInstance</span>().<span class="pl-en">toListMap</span>(<span class="pl-s1">classParams</span>);
                <span class="pl-s1">args</span>.<span class="pl-en">add</span>(<span class="pl-s1">params</span>);
            } <span class="pl-k">else</span> {

                <span class="pl-smi">String</span> <span class="pl-s1">classParams</span> = <span class="pl-s1">paramMap</span>.<span class="pl-en">get</span>(<span class="pl-smi">Constants</span>.<span class="pl-c1">DUBBO_CLASS_PARAMS</span>).<span class="pl-en">toString</span>();
                <span class="pl-s1">args</span>.<span class="pl-en">addAll</span>(<span class="pl-smi">GsonUtils</span>.<span class="pl-en">getInstance</span>().<span class="pl-en">fromJson</span>(<span class="pl-s1">classParams</span>, <span class="pl-smi">List</span>.<span class="pl-k">class</span>));
            }
        }

        <span class="pl-k">if</span> (<span class="pl-s1">paramMap</span>.<span class="pl-en">containsKey</span>(<span class="pl-smi">Constants</span>.<span class="pl-c1">DUBBO_GENERIC_PARAMS</span>) &amp;&amp; !<span class="pl-s">"null"</span>.<span class="pl-en">equals</span>(<span class="pl-s1">paramMap</span>.<span class="pl-en">get</span>(<span class="pl-smi">Constants</span>.<span class="pl-c1">DUBBO_GENERIC_PARAMS</span>).<span class="pl-en">toString</span>())) {

            <span class="pl-smi">Map</span>&lt;<span class="pl-smi">String</span>, <span class="pl-smi">Object</span>&gt; <span class="pl-s1">map</span> = <span class="pl-smi">GsonUtils</span>.<span class="pl-en">getInstance</span>().<span class="pl-en">toObjectMap</span>(<span class="pl-s1">paramMap</span>.<span class="pl-en">get</span>(<span class="pl-smi">Constants</span>.<span class="pl-c1">DUBBO_GENERIC_PARAMS</span>).<span class="pl-en">toString</span>());

            <span class="pl-s1">map</span>.<span class="pl-en">forEach</span>((<span class="pl-s1">k</span>, <span class="pl-s1">v</span>) -&gt; {

                <span class="pl-k">if</span> (<span class="pl-s1">v</span> <span class="pl-k">instanceof</span> <span class="pl-smi">JsonArray</span>) {
                    <span class="pl-smi">List</span>&lt;<span class="pl-smi">String</span>&gt; <span class="pl-s1">arg</span> = <span class="pl-smi">GsonUtils</span>.<span class="pl-en">getInstance</span>().<span class="pl-en">fromList</span>(<span class="pl-s1">v</span>.<span class="pl-en">toString</span>(), <span class="pl-smi">String</span>.<span class="pl-k">class</span>);

                    <span class="pl-s1">arg</span>.<span class="pl-en">forEach</span>(<span class="pl-s1">a</span> -&gt; {
                        <span class="pl-s1">parameterTypes</span>.<span class="pl-en">add</span>(<span class="pl-s1">k</span>);
                        <span class="pl-s1">args</span>.<span class="pl-en">add</span>(<span class="pl-s1">a</span>);
                    });

                } <span class="pl-k">else</span> {
                    <span class="pl-s1">parameterTypes</span>.<span class="pl-en">add</span>(<span class="pl-s1">k</span>);
                    <span class="pl-s1">args</span>.<span class="pl-en">add</span>(<span class="pl-s1">v</span>);
                }
            });

        }

        <span class="pl-k">return</span> <span class="pl-smi">Pair</span>.<span class="pl-en">of</span>(<span class="pl-s1">parameterTypes</span>.<span class="pl-en">toArray</span>(<span class="pl-k">new</span> <span class="pl-smi">String</span>[<span class="pl-c1">0</span>]), <span class="pl-s1">args</span>.<span class="pl-en">toArray</span>());
    }

}</pre></div>
<h3 dir="auto">Expected Result</h3>
<p dir="auto">dubbo 2.7.4.1进行泛化同步调用时，性能不弱于2.6.2</p>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">�dubbo 2.7.4.1 进行泛化同步调用时，性能大副弱于2.6.2</p>
<p dir="auto">If there is an exception, please attach the exception trace:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Just put your stack trace here!"><pre class="notranslate"><code class="notranslate">Just put your stack trace here!
</code></pre></div>