vio-lin opened a new issue, #14937:
URL: https://github.com/apache/dubbo/issues/14937

   ### Pre-check
   
   - [X] I am sure that all the content I provide is in English.
   
   
   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Apache Dubbo Component
   
   Java SDK (apache/dubbo)
   
   ### Dubbo Version
   
   Dubbo 3.2.6 linux: Linux 5.15.80
   i check code in branch 3.3
   
   ### Steps to reproduce this issue
   
   I want to deploy a dubbo reference with 2000 providers for test .  
   It is a 15 addition time cost when i try to ‘notify’ these provider url when 
i use new code in 3.2.6  
   zookeeperRegistry used.  
   
   ```
   // old code 
   URL url = URL.valueOf(providerUrl)
   // new code
   URL url = new DubboServiceAddressURL(rawProvider.getUrlAddress(), 
rawProvider.getUrlParam(), copyOfConsumer, overrideUrl))
   ```
   
   
![image](https://github.com/user-attachments/assets/7c5c304b-f608-448b-9e69-b8ef8a0c3f6a)
   
   There are some reflection operation and do not be cached .  
   it is ok in `export` but refer process this cost will be long when 
proveriders and methods list grow
   ```
   //  
org.apache.dubbo.common.utils.SerializeSecurityConfigurator#registerInterface
    if (!autoTrustSerializeClass) {
               return;
           }
   
           Set<Type> markedClass = new HashSet<>();
           checkClass(markedClass, clazz);
   
           addToAllow(clazz.getName());
   
           Method[] methodsToExport = clazz.getMethods();
   
           for (Method method : methodsToExport) {
               Class<?>[] parameterTypes = method.getParameterTypes();
               for (Class<?> parameterType : parameterTypes) {
                   checkClass(markedClass, parameterType);
               }
   ```
   
   i want to know is it necessary to be fixed?
   and if i work on it should it is will to use existed service cache in dubbo 
like ‘watch org.apache.dubbo.rpc.model.ReflectionServiceDescriptor '    
   or some dependency like  org.springframework.util.ReflectionUtils.    
   
   
   ### What you expected to happen
   
   there are 2000 instance in registry。 
   when i change timeout config in config center。  
   client do refrer all client to repalace this url。
   
    expected to happen : urls update in 10s when netty client do not changed
    actual : it takes more than 20 milites to update url  
   
   in my machine it take 5ms * 2000 times to process 
SerializeSecurityConfigurator addition
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request to fix on your own?
   
   - [X] Yes I am willing to submit a pull request on my own!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org
For additional commands, e-mail: notifications-h...@dubbo.apache.org

Reply via email to