This is an automated email from the ASF dual-hosted git repository.

earthchen pushed a commit to branch 3.1
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/3.1 by this push:
     new 4be3c796cc optimize the multi params request performance of triple in 
wrap mode (#11672)
4be3c796cc is described below

commit 4be3c796cc0be52daa21b70c4cbb48413f3fe481
Author: 一个不知名的Java靓仔 <[email protected]>
AuthorDate: Mon Feb 27 14:25:39 2023 +0800

    optimize the multi params request performance of triple in wrap mode 
(#11672)
---
 .../org/apache/dubbo/rpc/protocol/tri/ReflectionPackableMethod.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/ReflectionPackableMethod.java
 
b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/ReflectionPackableMethod.java
index 8667beb87a..52e6afc01f 100644
--- 
a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/ReflectionPackableMethod.java
+++ 
b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/ReflectionPackableMethod.java
@@ -390,11 +390,12 @@ public class ReflectionPackableMethod implements 
PackableMethod {
             for (String type : argumentsType) {
                 builder.addArgTypes(type);
             }
+            ByteArrayOutputStream bos = new ByteArrayOutputStream();
             for (int i = 0; i < arguments.length; i++) {
                 Object argument = arguments[i];
-                ByteArrayOutputStream bos = new ByteArrayOutputStream();
                 multipleSerialization.serialize(url, serialize, 
actualRequestTypes[i], argument, bos);
                 builder.addArgs(bos.toByteArray());
+                bos.reset();
             }
             return builder.build().toByteArray();
         }

Reply via email to